Added participant and other stuff
This commit is contained in:
@@ -1,118 +0,0 @@
|
||||
/************************************************************************************
|
||||
|
||||
Filename : OculusSpatializerUserParamsEditor.cs
|
||||
Content : This script adds editor functionality to OculusSpatializerUserParams script.
|
||||
Created : December 14, 2015
|
||||
Authors : Peter Giokaris
|
||||
|
||||
Copyright : Copyright 2015 Oculus VR, Inc. All Rights reserved.
|
||||
|
||||
Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
|
||||
you may not use the Oculus VR Rift SDK except in compliance with the License,
|
||||
which is provided at the time of installation or download, or which
|
||||
otherwise accompanies this software in either electronic or hard copy form.
|
||||
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.oculusvr.com/licenses/LICENSE-3.1
|
||||
|
||||
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
************************************************************************************/
|
||||
#define CUSTOM_LAYOUT
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
[CustomEditor(typeof(ONSPAudioSource))]
|
||||
|
||||
public class OculusSpatializerUserParamsEditor : Editor
|
||||
{
|
||||
// target component
|
||||
private ONSPAudioSource m_Component;
|
||||
|
||||
// highlight color
|
||||
// Color HColor = Color.green;
|
||||
|
||||
// OnEnable
|
||||
void OnEnable()
|
||||
{
|
||||
m_Component = (ONSPAudioSource)target;
|
||||
}
|
||||
|
||||
// OnDestroy
|
||||
void OnDestroy()
|
||||
{
|
||||
}
|
||||
|
||||
// OnInspectorGUI
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
GUI.color = Color.white;
|
||||
Undo.RecordObject(m_Component, "OculusSpatializerUserParams");
|
||||
|
||||
{
|
||||
#if CUSTOM_LAYOUT
|
||||
m_Component.EnableSpatialization = EditorGUILayout.Toggle("Spatialization Enabled", m_Component.EnableSpatialization);
|
||||
m_Component.EnableRfl = EditorGUILayout.Toggle("Reflections Enabled", m_Component.EnableRfl);
|
||||
m_Component.Gain = EditorGUILayout.FloatField("Gain", m_Component.Gain);
|
||||
|
||||
Separator();
|
||||
|
||||
Label ("OCULUS ATTENUATION");
|
||||
m_Component.UseInvSqr = EditorGUILayout.Toggle("Enabled", m_Component.UseInvSqr);
|
||||
Label ("");
|
||||
Label("RANGE (0.0 - 1000000.0 meters)");
|
||||
m_Component.Near = EditorGUILayout.FloatField("Minimum", m_Component.Near);
|
||||
m_Component.Far = EditorGUILayout.FloatField("Maximum", m_Component.Far);
|
||||
|
||||
Label("");
|
||||
Label("VOLUMETRIC RADIUS (0.0 - 1000.0 meters)");
|
||||
m_Component.VolumetricRadius = EditorGUILayout.FloatField("Radius", m_Component.VolumetricRadius);
|
||||
|
||||
Separator();
|
||||
/*
|
||||
// Reference GUI Layout fields
|
||||
m_Component.VerticalFOV = EditorGUILayout.FloatField("Vertical FOV", m_Component.VerticalFOV);
|
||||
m_Component.NeckPosition = EditorGUILayout.Vector3Field("Neck Position", m_Component.NeckPosition);
|
||||
m_Component.UsePlayerEyeHeight = EditorGUILayout.Toggle ("Use Player Eye Height", m_Component.UsePlayerEeHeight);
|
||||
m_Component.FollowOrientation = EditorGUILayout.ObjectField("Follow Orientation",
|
||||
m_Component.FollowOrientation,
|
||||
typeof(Transform), true) as Transform;
|
||||
m_Component.BackgroundColor = EditorGUILayout.ColorField("Background Color", m_Component.BackgroundColor);
|
||||
OVREditorGUIUtility.Separator();
|
||||
*/
|
||||
|
||||
#else
|
||||
DrawDefaultInspector ();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
EditorUtility.SetDirty(m_Component);
|
||||
}
|
||||
}
|
||||
|
||||
// Utilities, move out of here (or copy over to other editor script)
|
||||
|
||||
// Separator
|
||||
void Separator()
|
||||
{
|
||||
GUI.color = new Color(1, 1, 1, 0.25f);
|
||||
GUILayout.Box("", "HorizontalSlider", GUILayout.Height(16));
|
||||
GUI.color = Color.white;
|
||||
}
|
||||
|
||||
// Label
|
||||
void Label(string label)
|
||||
{
|
||||
EditorGUILayout.LabelField (label);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb850b86de9091d4db4595959c56f954
|
||||
timeCreated: 1442269815
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,99 +0,0 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class OculusSpatializerReflectionCustomGUI : IAudioEffectPluginGUI
|
||||
{
|
||||
public override string Name
|
||||
{
|
||||
get { return "OculusSpatializerReflection"; }
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return "Reflection parameters for Oculus Spatializer"; }
|
||||
}
|
||||
|
||||
public override string Vendor
|
||||
{
|
||||
get { return "Oculus"; }
|
||||
}
|
||||
|
||||
public override bool OnGUI(IAudioEffectPlugin plugin)
|
||||
{
|
||||
float fval = 0.0f;
|
||||
bool bval = false;
|
||||
|
||||
Separator();
|
||||
Label ("GLOBAL SCALE (0.00001 - 10000.0)");
|
||||
plugin.GetFloatParameter("GScale", out fval);
|
||||
plugin.SetFloatParameter("GScale", EditorGUILayout.FloatField(" ", Mathf.Clamp (fval, 0.00001f, 10000.0f)));
|
||||
|
||||
Separator();
|
||||
|
||||
// Treat these floats as bools in the inspector
|
||||
plugin.GetFloatParameter("E.Rflt On", out fval);
|
||||
bval = (fval == 0.0f) ? false : true;
|
||||
bval = EditorGUILayout.Toggle("Reflections Engine On", bval);
|
||||
plugin.SetFloatParameter("E.Rflt On", (bval == false) ? 0.0f : 1.0f);
|
||||
|
||||
plugin.GetFloatParameter("E.Rflt Rev On", out fval);
|
||||
bval = (fval == 0.0f) ? false : true;
|
||||
bval = EditorGUILayout.Toggle("Late Reverberation", bval);
|
||||
plugin.SetFloatParameter("E.Rflt Rev On", (bval == false) ? 0.0f : 1.0f);
|
||||
|
||||
Separator();
|
||||
Label("ROOM DIMENSIONS (meters)");
|
||||
Label("");
|
||||
plugin.GetFloatParameter("Room X", out fval);
|
||||
plugin.SetFloatParameter("Room X", EditorGUILayout.Slider("Width", fval, 1.0f, 200.0f));
|
||||
plugin.GetFloatParameter("Room Y", out fval);
|
||||
plugin.SetFloatParameter("Room Y", EditorGUILayout.Slider("Height", fval, 1.0f, 200.0f));
|
||||
plugin.GetFloatParameter("Room Z", out fval);
|
||||
plugin.SetFloatParameter("Room Z", EditorGUILayout.Slider("Length", fval, 1.0f, 200.0f));
|
||||
|
||||
Separator();
|
||||
Label("WALL REFLECTION COEFFICIENTS (0.0 - 0.97)");
|
||||
Label("");
|
||||
|
||||
plugin.GetFloatParameter("Left", out fval);
|
||||
plugin.SetFloatParameter("Left", EditorGUILayout.Slider("Left", fval, 0.0f, 0.97f));
|
||||
plugin.GetFloatParameter("Right", out fval);
|
||||
plugin.SetFloatParameter("Right", EditorGUILayout.Slider("Right", fval, 0.0f, 0.97f));
|
||||
plugin.GetFloatParameter("Up", out fval);
|
||||
plugin.SetFloatParameter("Up", EditorGUILayout.Slider("Up", fval, 0.0f, 0.97f));
|
||||
plugin.GetFloatParameter("Down", out fval);
|
||||
plugin.SetFloatParameter("Down", EditorGUILayout.Slider("Down", fval, 0.0f, 0.97f));
|
||||
plugin.GetFloatParameter("Behind", out fval);
|
||||
plugin.SetFloatParameter("Behind", EditorGUILayout.Slider("Back", fval, 0.0f, 0.97f));
|
||||
plugin.GetFloatParameter("Front", out fval);
|
||||
plugin.SetFloatParameter("Front", EditorGUILayout.Slider("Front", fval, 0.0f, 0.97f));
|
||||
|
||||
Separator();
|
||||
Label("SHARED REVERB ATTENUATION RANGE (1.0 - 10000.0 meters)");
|
||||
Label("");
|
||||
plugin.GetFloatParameter("Shared Rev Min", out fval);
|
||||
plugin.SetFloatParameter("Shared Rev Min", EditorGUILayout.Slider("Minimum", fval, 1.0f, 10000.0f));
|
||||
plugin.GetFloatParameter("Shared Rev Max", out fval);
|
||||
plugin.SetFloatParameter("Shared Rev Max", EditorGUILayout.Slider("Maximum", fval, 1.0f, 10000.0f));
|
||||
|
||||
// We will override the controls with our own, so return false
|
||||
return false;
|
||||
}
|
||||
|
||||
// Separator
|
||||
void Separator()
|
||||
{
|
||||
GUI.color = new Color(1, 1, 1, 0.25f);
|
||||
GUILayout.Box("", "HorizontalSlider", GUILayout.Height(16));
|
||||
GUI.color = Color.white;
|
||||
}
|
||||
|
||||
// Label
|
||||
void Label(string label)
|
||||
{
|
||||
EditorGUILayout.LabelField (label);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: db551baa938b4714490ee011b5541447
|
||||
timeCreated: 1444752157
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user