summaryrefslogtreecommitdiff
path: root/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3
diff options
context:
space:
mode:
Diffstat (limited to 'VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3')
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCDestructibleUdonEditor.cs59
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCDestructibleUdonEditor.cs.meta11
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCMidiEditor.cs25
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCMidiEditor.cs.meta3
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCPlayerStationEditor3.cs33
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCPlayerStationEditor3.cs.meta11
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCSceneDescriptorEditor3.cs27
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCSceneDescriptorEditor3.cs.meta12
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_PickupEditor3.cs71
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_PickupEditor3.cs.meta11
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_SpatialAudioSourceEditor3.cs58
-rw-r--r--VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_SpatialAudioSourceEditor3.cs.meta11
12 files changed, 332 insertions, 0 deletions
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCDestructibleUdonEditor.cs b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCDestructibleUdonEditor.cs
new file mode 100644
index 00000000..d4c75bf1
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCDestructibleUdonEditor.cs
@@ -0,0 +1,59 @@
+/*
+#if VRC_SDK_VRCSDK3
+
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEditor;
+using System;
+
+[CustomEditor(typeof(VRC.SDK3.Components.VRCDestructibleUdon))]
+public class VRCDestructibleUdonEditor : Editor
+{
+ VRC.SDK3.Components.VRCDestructibleUdon myTarget;
+
+ void OnEnable()
+ {
+ if (myTarget == null)
+ myTarget = (VRC.SDK3.Components.VRCDestructibleUdon)target;
+ }
+
+ string[] UdonMethods = null;
+ string[] UdonVariables = null;
+
+ public override void OnInspectorGUI()
+ {
+ var udon = myTarget.GetComponent<VRC.Udon.UdonBehaviour>();
+ if (udon != null)
+ {
+ #if VRC_CLIENT
+ myTarget.UdonMethodApplyDamage = EditorGUILayout.TextField("On Apply Damage", myTarget.UdonMethodApplyDamage);
+ myTarget.UdonMethodApplyHealing= EditorGUILayout.TextField("On Apply Healing", myTarget.UdonMethodApplyHealing);
+ myTarget.UdonVariableCurrentHealth= EditorGUILayout.TextField("Current Health Variable", myTarget.UdonVariableCurrentHealth);
+ myTarget.UdonVariableMaxHealth = EditorGUILayout.TextField("On Max Health Variable", myTarget.UdonVariableMaxHealth);
+ #else
+ List<string> methods = new List<string>(udon.GetPrograms());
+ methods.Insert(0, "-none-");
+ myTarget.UdonMethodApplyDamage = DrawUdonProgramPicker("On Apply Damage", myTarget.UdonMethodApplyDamage, methods);
+ myTarget.UdonMethodApplyHealing = DrawUdonProgramPicker("On Apply Healing", myTarget.UdonMethodApplyHealing, methods);
+ List<string> variables = new List<string>(udon.publicVariables.VariableSymbols);
+ variables.Insert(0, "-none-");
+ myTarget.UdonVariableCurrentHealth = DrawUdonProgramPicker("Current Health Variable", myTarget.UdonVariableCurrentHealth, variables);
+ myTarget.UdonVariableMaxHealth = DrawUdonProgramPicker("Max Health Variable", myTarget.UdonVariableMaxHealth, variables);
+ #endif
+ }
+ }
+
+ string DrawUdonProgramPicker(string title, string current, List<string> choices)
+ {
+ int index = choices.IndexOf(current);
+ if (index == -1)
+ index = 0;
+ int value = EditorGUILayout.Popup(title, index, choices.ToArray());
+ if (value != 0)
+ return choices[value];
+ return current;
+ }
+}
+#endif
+*/ \ No newline at end of file
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCDestructibleUdonEditor.cs.meta b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCDestructibleUdonEditor.cs.meta
new file mode 100644
index 00000000..79c111bf
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCDestructibleUdonEditor.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d57b23c04034119448f23c5fdbc57662
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCMidiEditor.cs b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCMidiEditor.cs
new file mode 100644
index 00000000..454d8dce
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCMidiEditor.cs
@@ -0,0 +1,25 @@
+using UnityEditor;
+using UnityEngine;
+using VRC.SDK3.Midi;
+using VRC.SDKBase.Midi;
+#if (UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN) && !UNITY_ANDROID
+namespace VRC.SDK3.Editor
+{
+ [CustomEditor(typeof(VRCMidiListener))]
+ public class VRCMidiListenerEditor : UnityEditor.Editor
+ {
+#if UNITY_STANDALONE_WIN
+ [RuntimeInitializeOnLoadMethod]
+ public static void InitializeMidi()
+ {
+ VRCMidiHandler.OnLog = (message) => Debug.Log(message);
+ VRCMidiHandler.Initialize = () =>
+ {
+ return VRCMidiHandler.OpenMidiInput<VRCPortMidiInput>(
+ EditorPrefs.GetString(VRCMidiWindow.DEVICE_NAME_STRING));
+ };
+ }
+#endif
+ }
+}
+#endif \ No newline at end of file
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCMidiEditor.cs.meta b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCMidiEditor.cs.meta
new file mode 100644
index 00000000..723ff8e5
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCMidiEditor.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 5b1017097f3d46cd949892e0fce3ece9
+timeCreated: 1612853300 \ No newline at end of file
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCPlayerStationEditor3.cs b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCPlayerStationEditor3.cs
new file mode 100644
index 00000000..55f307c4
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCPlayerStationEditor3.cs
@@ -0,0 +1,33 @@
+#if VRC_SDK_VRCSDK3
+
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEditor;
+using System;
+
+[CustomEditor(typeof(VRC.SDK3.Components.VRCStation))]
+public class VRCPlayerStationEditor3 : Editor
+{
+ VRC.SDK3.Components.VRCStation myTarget;
+
+ void OnEnable()
+ {
+ if(myTarget == null)
+ myTarget = (VRC.SDK3.Components.VRCStation)target;
+ }
+
+ public override void OnInspectorGUI()
+ {
+ myTarget.PlayerMobility = (VRC.SDKBase.VRCStation.Mobility)EditorGUILayout.EnumPopup("Player Mobility", myTarget.PlayerMobility);
+ myTarget.canUseStationFromStation = EditorGUILayout.Toggle("Can Use Station From Station", myTarget.canUseStationFromStation);
+ myTarget.animatorController = (RuntimeAnimatorController) EditorGUILayout.ObjectField("Animator Controller", myTarget.animatorController, typeof(RuntimeAnimatorController), false );
+ myTarget.disableStationExit = EditorGUILayout.Toggle("Disable Station Exit", myTarget.disableStationExit );
+ myTarget.seated = EditorGUILayout.Toggle("Seated", myTarget.seated);
+ myTarget.stationEnterPlayerLocation = (Transform)EditorGUILayout.ObjectField("Player Enter Location", myTarget.stationEnterPlayerLocation, typeof(Transform), true);
+ myTarget.stationExitPlayerLocation = (Transform)EditorGUILayout.ObjectField("Player Exit Location", myTarget.stationExitPlayerLocation, typeof(Transform), true);
+ myTarget.controlsObject = (VRC.SDKBase.VRC_ObjectApi)EditorGUILayout.ObjectField("API Object", myTarget.controlsObject, typeof(VRC.SDKBase.VRC_ObjectApi), false);
+ }
+
+}
+#endif \ No newline at end of file
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCPlayerStationEditor3.cs.meta b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCPlayerStationEditor3.cs.meta
new file mode 100644
index 00000000..956b47c0
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCPlayerStationEditor3.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8901d07a685ca424492a3cabff506184
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCSceneDescriptorEditor3.cs b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCSceneDescriptorEditor3.cs
new file mode 100644
index 00000000..7eee02e3
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCSceneDescriptorEditor3.cs
@@ -0,0 +1,27 @@
+#if VRC_SDK_VRCSDK3
+
+using UnityEditor;
+
+[CustomEditor (typeof(VRC.SDK3.Components.VRCSceneDescriptor))]
+public class VRCSceneDescriptorEditor3 : Editor
+{
+ VRC.SDK3.Components.VRCSceneDescriptor sceneDescriptor;
+ VRC.Core.PipelineManager pipelineManager;
+
+ public override void OnInspectorGUI()
+ {
+ if(sceneDescriptor == null)
+ sceneDescriptor = (VRC.SDK3.Components.VRCSceneDescriptor)target;
+
+ if(pipelineManager == null)
+ {
+ pipelineManager = sceneDescriptor.GetComponent<VRC.Core.PipelineManager>();
+ if(pipelineManager == null)
+ sceneDescriptor.gameObject.AddComponent<VRC.Core.PipelineManager>();
+ }
+
+ DrawDefaultInspector();
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCSceneDescriptorEditor3.cs.meta b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCSceneDescriptorEditor3.cs.meta
new file mode 100644
index 00000000..df3e2505
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRCSceneDescriptorEditor3.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4b2b9ac625bc5b04c887ff9ee9b5fdbe
+timeCreated: 1450463561
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_PickupEditor3.cs b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_PickupEditor3.cs
new file mode 100644
index 00000000..8954647d
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_PickupEditor3.cs
@@ -0,0 +1,71 @@
+#if VRC_SDK_VRCSDK3 && UNITY_EDITOR
+
+using UnityEditor;
+using UnityEngine;
+
+namespace VRC.SDK3
+{
+ [CustomEditor(typeof(VRC.SDK3.Components.VRCPickup))]
+ public class VRC_PickupEditor3 : UnityEditor.Editor
+ {
+ private void InspectorField(string propertyName, string humanName)
+ {
+ SerializedProperty propertyField = serializedObject.FindProperty(propertyName);
+ EditorGUILayout.PropertyField(propertyField, new GUIContent(humanName), true);
+ }
+
+ private SerializedProperty momentumTransferMethodProperty;
+ private SerializedProperty disallowTheftProperty;
+ private SerializedProperty exactGunProperty;
+ private SerializedProperty exactGripProperty;
+ private SerializedProperty allowManipulationWhenEquippedProperty;
+ private SerializedProperty orientationProperty;
+ private SerializedProperty autoHoldProperty;
+ private SerializedProperty interactionTextProperty;
+ private SerializedProperty useTextProperty;
+ private SerializedProperty throwVelocityBoostMinSpeedProperty;
+ private SerializedProperty throwVelocityBoostScaleProperty;
+ private SerializedProperty pickupableProperty;
+ private SerializedProperty proximityProperty;
+
+ public override void OnInspectorGUI()
+ {
+ momentumTransferMethodProperty = serializedObject.FindProperty("MomentumTransferMethod");
+ disallowTheftProperty = serializedObject.FindProperty("DisallowTheft");
+ exactGunProperty = serializedObject.FindProperty("ExactGun");
+ exactGripProperty = serializedObject.FindProperty("ExactGrip");
+ allowManipulationWhenEquippedProperty = serializedObject.FindProperty("allowManipulationWhenEquipped");
+ orientationProperty = serializedObject.FindProperty("orientation");
+ autoHoldProperty = serializedObject.FindProperty("AutoHold");
+ interactionTextProperty = serializedObject.FindProperty("InteractionText");
+ useTextProperty = serializedObject.FindProperty("UseText");
+ throwVelocityBoostMinSpeedProperty = serializedObject.FindProperty("ThrowVelocityBoostMinSpeed");
+ throwVelocityBoostScaleProperty = serializedObject.FindProperty("ThrowVelocityBoostScale");
+ pickupableProperty = serializedObject.FindProperty("pickupable");
+ proximityProperty = serializedObject.FindProperty("proximity");
+
+ EditorGUILayout.BeginVertical(GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 30));
+
+ EditorGUILayout.PropertyField(momentumTransferMethodProperty, new GUIContent("Momentum Transfer Method"));
+ EditorGUILayout.PropertyField(disallowTheftProperty, new GUIContent("Disallow Theft"));
+ EditorGUILayout.PropertyField(exactGunProperty, new GUIContent("Exact Gun"));
+ EditorGUILayout.PropertyField(exactGripProperty, new GUIContent("Exact Grip"));
+ EditorGUILayout.PropertyField(allowManipulationWhenEquippedProperty, new GUIContent("Allow Manipulation When Equipped"));
+ EditorGUILayout.PropertyField(orientationProperty, new GUIContent("Orientation"));
+ EditorGUILayout.PropertyField(autoHoldProperty, new GUIContent("AutoHold", "If the pickup is supposed to be aligned to the hand (i.e. orientation field is set to Gun or Grip), auto-detect means that it will be Equipped(not dropped when they release trigger), otherwise just hold as a normal pickup."));
+ EditorGUILayout.PropertyField(interactionTextProperty, new GUIContent("Interaction Text","Text displayed when user hovers over the pickup."));
+ if (autoHoldProperty.enumValueIndex != (int)VRC.SDK3.Components.VRCPickup.AutoHoldMode.No)
+ EditorGUILayout.PropertyField(useTextProperty, new GUIContent("Use Text", "Text to display describing action for clicking button, when this pickup is already being held."));
+ EditorGUILayout.PropertyField(throwVelocityBoostMinSpeedProperty, new GUIContent("Throw Velocity Boost Min Speed"));
+ EditorGUILayout.PropertyField(throwVelocityBoostScaleProperty, new GUIContent("Throw Velocity Boost Scale"));
+ EditorGUILayout.PropertyField(pickupableProperty, new GUIContent("Pickupable"));
+ EditorGUILayout.PropertyField(proximityProperty, new GUIContent("Proximity"));
+
+ EditorGUILayout.EndVertical();
+
+ serializedObject.ApplyModifiedProperties();
+ }
+
+ }
+}
+#endif \ No newline at end of file
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_PickupEditor3.cs.meta b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_PickupEditor3.cs.meta
new file mode 100644
index 00000000..d0eb02dc
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_PickupEditor3.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a8cc4c1876b26174fbaeb062178a6bda
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_SpatialAudioSourceEditor3.cs b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_SpatialAudioSourceEditor3.cs
new file mode 100644
index 00000000..0a5eec56
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_SpatialAudioSourceEditor3.cs
@@ -0,0 +1,58 @@
+#if VRC_SDK_VRCSDK3
+#if UNITY_EDITOR
+
+using UnityEngine;
+using UnityEditor;
+
+namespace VRC.SDK3.Editor
+{
+ [CustomEditor(typeof(VRC.SDK3.Components.VRCSpatialAudioSource))]
+ public class VRC_SpatialAudioSourceEditor3 : UnityEditor.Editor
+ {
+ private bool showAdvancedOptions = false;
+ private SerializedProperty gainProperty;
+ private SerializedProperty nearProperty;
+ private SerializedProperty farProperty;
+ private SerializedProperty volRadiusProperty;
+ private SerializedProperty enableSpatialProperty;
+ private SerializedProperty useCurveProperty;
+
+ public override void OnInspectorGUI()
+ {
+ gainProperty = serializedObject.FindProperty("Gain");
+ nearProperty = serializedObject.FindProperty("Near");
+ farProperty = serializedObject.FindProperty("Far");
+ volRadiusProperty = serializedObject.FindProperty("VolumetricRadius");
+ enableSpatialProperty = serializedObject.FindProperty("EnableSpatialization");
+ useCurveProperty = serializedObject.FindProperty("UseAudioSourceVolumeCurve");
+
+ serializedObject.Update();
+
+ VRC.SDKBase.VRC_SpatialAudioSource target = serializedObject.targetObject as VRC.SDKBase.VRC_SpatialAudioSource;
+ AudioSource source = target.GetComponent<AudioSource>();
+
+ EditorGUILayout.BeginVertical();
+
+ EditorGUILayout.PropertyField(gainProperty, new GUIContent("Gain"));
+ EditorGUILayout.PropertyField(farProperty, new GUIContent("Far"));
+ showAdvancedOptions = EditorGUILayout.Foldout(showAdvancedOptions, "Advanced Options");
+ bool enableSp = enableSpatialProperty.boolValue;
+ if (showAdvancedOptions)
+ {
+ EditorGUILayout.PropertyField(nearProperty, new GUIContent("Near"));
+ EditorGUILayout.PropertyField(volRadiusProperty, new GUIContent("Volumetric Radius"));
+ EditorGUILayout.PropertyField(enableSpatialProperty, new GUIContent("Enable Spatialization"));
+ if (enableSp)
+ EditorGUILayout.PropertyField(useCurveProperty, new GUIContent("Use AudioSource Volume Curve"));
+ }
+
+ EditorGUILayout.EndVertical();
+
+ if (source != null)
+ source.spatialize = enableSp;
+ serializedObject.ApplyModifiedProperties();
+ }
+ }
+}
+#endif
+#endif \ No newline at end of file
diff --git a/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_SpatialAudioSourceEditor3.cs.meta b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_SpatialAudioSourceEditor3.cs.meta
new file mode 100644
index 00000000..75ef7b25
--- /dev/null
+++ b/VRCSDK3Worlds/Assets/VRCSDK/SDK3/Editor/Components3/VRC_SpatialAudioSourceEditor3.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3f8f999a8e1ebee4588f94a8a618d7c6
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: