diff --git a/.gitignore b/.gitignore index ead58bd..1137af4 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ Assets/SerializedUdonPrograms.meta ClientSimStorage Assets/TextMesh Pro Packages +Assets/UdonSharp diff --git a/Assets/UdonSharp/UdonSharpDataLocator.asset b/Assets/UdonSharp/UdonSharpDataLocator.asset deleted file mode 100644 index d1f55cd..0000000 --- a/Assets/UdonSharp/UdonSharpDataLocator.asset +++ /dev/null @@ -1,14 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6769ed80171cc314bb08688a48d812a1, type: 3} - m_Name: UdonSharpDataLocator - m_EditorClassIdentifier: diff --git a/Assets/UdonSharp/UdonSharpDataLocator.asset.meta b/Assets/UdonSharp/UdonSharpDataLocator.asset.meta deleted file mode 100644 index bd131fd..0000000 --- a/Assets/UdonSharp/UdonSharpDataLocator.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0e4c0b6cf57e5d84ba31b7e7ed1e5c6c -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts.meta b/Assets/UdonSharp/UtilityScripts.meta deleted file mode 100644 index ebd5f8b..0000000 --- a/Assets/UdonSharp/UtilityScripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d3a1af4600e47624c8e723c33df8835a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/BoneFollower.asset b/Assets/UdonSharp/UtilityScripts/BoneFollower.asset deleted file mode 100644 index b946757..0000000 --- a/Assets/UdonSharp/UtilityScripts/BoneFollower.asset +++ /dev/null @@ -1,215 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} - m_Name: BoneFollower - m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: ccbda9bf23e2f714c9226283c77a92e5, - type: 2} - udonAssembly: - assemblyError: - sourceCsScript: {fileID: 11500000, guid: d1a6820e86752e14d8227ad846e6ab81, type: 3} - scriptVersion: 2 - compiledVersion: 2 - behaviourSyncMode: 2 - hasInteractEvent: 0 - scriptID: -8649896170860527834 - serializationData: - SerializedFormat: 2 - SerializedBytes: - ReferencedUnityObjects: [] - SerializedBytesString: - Prefab: {fileID: 0} - PrefabModificationsReferencedUnityObjects: [] - PrefabModifications: [] - SerializationNodes: - - Name: fieldDefinitions - Entry: 7 - Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, - UdonSharp.Editor]], mscorlib - - Name: comparer - Entry: 7 - Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, - mscorlib]], mscorlib - - Name: - Entry: 8 - Data: - - Name: - Entry: 12 - Data: 3 - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: trackedBone - - Name: $v - Entry: 7 - Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: trackedBone - - Name: k__BackingField - Entry: 7 - Data: 3|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: UnityEngine.HumanBodyBones, UnityEngine.AnimationModule - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: playerApi - - Name: $v - Entry: 7 - Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: playerApi - - Name: k__BackingField - Entry: 7 - Data: 6|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: VRC.SDKBase.VRCPlayerApi, VRCSDKBase - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 6 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: isInEditor - - Name: $v - Entry: 7 - Data: 8|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: isInEditor - - Name: k__BackingField - Entry: 7 - Data: 9|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: System.Boolean, mscorlib - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 9 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 10|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: diff --git a/Assets/UdonSharp/UtilityScripts/BoneFollower.asset.meta b/Assets/UdonSharp/UtilityScripts/BoneFollower.asset.meta deleted file mode 100644 index 7884603..0000000 --- a/Assets/UdonSharp/UtilityScripts/BoneFollower.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 33324f447d661da40b534c9fa93c0ec2 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/BoneFollower.cs b/Assets/UdonSharp/UtilityScripts/BoneFollower.cs deleted file mode 100644 index d6e760c..0000000 --- a/Assets/UdonSharp/UtilityScripts/BoneFollower.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using UnityEngine; -using VRC.SDK3.Components; -using VRC.SDKBase; -using VRC.Udon; - -namespace UdonSharp.Examples.Utilities -{ - /// - /// Follows a chosen bone on humanoid avatars using the playerapi - /// - [AddComponentMenu("Udon Sharp/Utilities/Bone Follower")] - [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] - public class BoneFollower : UdonSharpBehaviour - { - public HumanBodyBones trackedBone; - - VRCPlayerApi playerApi; - bool isInEditor; - - void Start() - { - playerApi = Networking.LocalPlayer; - isInEditor = playerApi == null; - } - - void Update() - { - if (isInEditor) - return; - - transform.SetPositionAndRotation(playerApi.GetBonePosition(trackedBone), playerApi.GetBoneRotation(trackedBone)); - } - } -} diff --git a/Assets/UdonSharp/UtilityScripts/BoneFollower.cs.meta b/Assets/UdonSharp/UtilityScripts/BoneFollower.cs.meta deleted file mode 100644 index fe7b81b..0000000 --- a/Assets/UdonSharp/UtilityScripts/BoneFollower.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d1a6820e86752e14d8227ad846e6ab81 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/ExampleUtilityTemplate.txt b/Assets/UdonSharp/UtilityScripts/ExampleUtilityTemplate.txt deleted file mode 100644 index c79bfd1..0000000 --- a/Assets/UdonSharp/UtilityScripts/ExampleUtilityTemplate.txt +++ /dev/null @@ -1,15 +0,0 @@ - -using UnityEngine; -using VRC.SDK3.Components; -using VRC.SDKBase; -using VRC.Udon; - -namespace UdonSharp.Examples.Utilities -{ - /// - /// - /// - public class : UdonSharpBehaviour - { - } -} diff --git a/Assets/UdonSharp/UtilityScripts/ExampleUtilityTemplate.txt.meta b/Assets/UdonSharp/UtilityScripts/ExampleUtilityTemplate.txt.meta deleted file mode 100644 index b859eec..0000000 --- a/Assets/UdonSharp/UtilityScripts/ExampleUtilityTemplate.txt.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 8b953b0aef25b204eb36afc5968f41b7 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/InteractToggle.asset b/Assets/UdonSharp/UtilityScripts/InteractToggle.asset deleted file mode 100644 index b35639e..0000000 --- a/Assets/UdonSharp/UtilityScripts/InteractToggle.asset +++ /dev/null @@ -1,116 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} - m_Name: InteractToggle - m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: 405e38d3dfb2f514daeed0e28fbb4864, - type: 2} - udonAssembly: - assemblyError: - sourceCsScript: {fileID: 11500000, guid: c145dd4792c31da4b83d542b11ca2b66, type: 3} - scriptVersion: 2 - compiledVersion: 2 - behaviourSyncMode: 2 - hasInteractEvent: 1 - scriptID: 2484734778703140822 - serializationData: - SerializedFormat: 2 - SerializedBytes: - ReferencedUnityObjects: [] - SerializedBytesString: - Prefab: {fileID: 0} - PrefabModificationsReferencedUnityObjects: [] - PrefabModifications: [] - SerializationNodes: - - Name: fieldDefinitions - Entry: 7 - Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, - UdonSharp.Editor]], mscorlib - - Name: comparer - Entry: 7 - Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, - mscorlib]], mscorlib - - Name: - Entry: 8 - Data: - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: toggleObjects - - Name: $v - Entry: 7 - Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: toggleObjects - - Name: k__BackingField - Entry: 7 - Data: 3|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: UnityEngine.GameObject[], UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 5|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: List of objects to toggle on and off - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: diff --git a/Assets/UdonSharp/UtilityScripts/InteractToggle.asset.meta b/Assets/UdonSharp/UtilityScripts/InteractToggle.asset.meta deleted file mode 100644 index d253885..0000000 --- a/Assets/UdonSharp/UtilityScripts/InteractToggle.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 75f3b7bb830f4324a8b2f49814f3493a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/InteractToggle.cs b/Assets/UdonSharp/UtilityScripts/InteractToggle.cs deleted file mode 100644 index 04daa23..0000000 --- a/Assets/UdonSharp/UtilityScripts/InteractToggle.cs +++ /dev/null @@ -1,28 +0,0 @@ - -using UnityEngine; -using VRC.SDK3.Components; - -namespace UdonSharp.Examples.Utilities -{ - /// - /// A Basic example class that demonstrates how to toggle a list of object on and off when someone interacts with the UdonBehaviour - /// This toggle only works locally - /// - [AddComponentMenu("Udon Sharp/Utilities/Interact Toggle")] - [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] - public class InteractToggle : UdonSharpBehaviour - { - [Tooltip("List of objects to toggle on and off")] - public GameObject[] toggleObjects; - - public override void Interact() - { - foreach (GameObject toggleObject in toggleObjects) - { - if (toggleObject != null) { - toggleObject.SetActive(!toggleObject.activeSelf); - } - } - } - } -} diff --git a/Assets/UdonSharp/UtilityScripts/InteractToggle.cs.meta b/Assets/UdonSharp/UtilityScripts/InteractToggle.cs.meta deleted file mode 100644 index c75041a..0000000 --- a/Assets/UdonSharp/UtilityScripts/InteractToggle.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c145dd4792c31da4b83d542b11ca2b66 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/PlayerModSetter.asset b/Assets/UdonSharp/UtilityScripts/PlayerModSetter.asset deleted file mode 100644 index 1def3de..0000000 --- a/Assets/UdonSharp/UtilityScripts/PlayerModSetter.asset +++ /dev/null @@ -1,362 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} - m_Name: PlayerModSetter - m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: f938e6c4ff027a74da405a1f9353fd2b, - type: 2} - udonAssembly: - assemblyError: - sourceCsScript: {fileID: 11500000, guid: b8c59fc0a015dcc4b86d7e90312acf63, type: 3} - scriptVersion: 2 - compiledVersion: 2 - behaviourSyncMode: 2 - hasInteractEvent: 0 - scriptID: -58344667080892347 - serializationData: - SerializedFormat: 2 - SerializedBytes: - ReferencedUnityObjects: [] - SerializedBytesString: - Prefab: {fileID: 0} - PrefabModificationsReferencedUnityObjects: [] - PrefabModifications: [] - SerializationNodes: - - Name: fieldDefinitions - Entry: 7 - Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, - UdonSharp.Editor]], mscorlib - - Name: comparer - Entry: 7 - Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, - mscorlib]], mscorlib - - Name: - Entry: 8 - Data: - - Name: - Entry: 12 - Data: 6 - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: jumpHeight - - Name: $v - Entry: 7 - Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: jumpHeight - - Name: k__BackingField - Entry: 7 - Data: 3|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: System.Single, mscorlib - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: runSpeed - - Name: $v - Entry: 7 - Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: runSpeed - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 6|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: walkSpeed - - Name: $v - Entry: 7 - Data: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: walkSpeed - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: strafeSpeed - - Name: $v - Entry: 7 - Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: strafeSpeed - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 10|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: gravity - - Name: $v - Entry: 7 - Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: gravity - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 12|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: useLegacyLocomotion - - Name: $v - Entry: 7 - Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: useLegacyLocomotion - - Name: k__BackingField - Entry: 7 - Data: 14|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: System.Boolean, mscorlib - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 14 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 16|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: Enables legacy locomotion which allows stutter stepping and wall climbing - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: diff --git a/Assets/UdonSharp/UtilityScripts/PlayerModSetter.asset.meta b/Assets/UdonSharp/UtilityScripts/PlayerModSetter.asset.meta deleted file mode 100644 index f393f91..0000000 --- a/Assets/UdonSharp/UtilityScripts/PlayerModSetter.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 667c46fd2864a124ea921d98d4914fe5 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/PlayerModSetter.cs b/Assets/UdonSharp/UtilityScripts/PlayerModSetter.cs deleted file mode 100644 index 1b5669b..0000000 --- a/Assets/UdonSharp/UtilityScripts/PlayerModSetter.cs +++ /dev/null @@ -1,41 +0,0 @@ - -using UnityEngine; -using UdonSharp; -using VRC.SDKBase; - -namespace UdonSharp.Examples.Utilities -{ - [AddComponentMenu("Udon Sharp/Utilities/Player Mod Setter")] - [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] - public class PlayerModSetter : UdonSharpBehaviour - { - public float jumpHeight = 3f; - public float runSpeed = 4f; - public float walkSpeed = 2f; - public float strafeSpeed = 2f; - public float gravity = 1f; - - [Tooltip("Enables legacy locomotion which allows stutter stepping and wall climbing")] - public bool useLegacyLocomotion = false; - - void Start() - { - var playerApi = Networking.LocalPlayer; - - // Prevent error in editor from null player API - if (playerApi != null) - { - playerApi.SetJumpImpulse(jumpHeight); - playerApi.SetRunSpeed(runSpeed); - playerApi.SetWalkSpeed(walkSpeed); - playerApi.SetStrafeSpeed(strafeSpeed); - playerApi.SetGravityStrength(gravity); - - if (useLegacyLocomotion) - playerApi.UseLegacyLocomotion(); - } - - Destroy(this); - } - } -} diff --git a/Assets/UdonSharp/UtilityScripts/PlayerModSetter.cs.meta b/Assets/UdonSharp/UtilityScripts/PlayerModSetter.cs.meta deleted file mode 100644 index 8fc0e8c..0000000 --- a/Assets/UdonSharp/UtilityScripts/PlayerModSetter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b8c59fc0a015dcc4b86d7e90312acf63 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/Synced.meta b/Assets/UdonSharp/UtilityScripts/Synced.meta deleted file mode 100644 index 8ea2234..0000000 --- a/Assets/UdonSharp/UtilityScripts/Synced.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c67458d48fdcc634aa0a93f106cd250b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.asset b/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.asset deleted file mode 100644 index 8101274..0000000 --- a/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.asset +++ /dev/null @@ -1,167 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} - m_Name: GlobalToggleObject - m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: c49c9265a3ef24642a6a4465d0a78872, - type: 2} - udonAssembly: - assemblyError: - sourceCsScript: {fileID: 11500000, guid: a3d8ddeb56f3a0c4daf49fe9d7447a3e, type: 3} - scriptVersion: 2 - compiledVersion: 2 - behaviourSyncMode: 4 - hasInteractEvent: 1 - scriptID: -8649947059896150926 - serializationData: - SerializedFormat: 2 - SerializedBytes: - ReferencedUnityObjects: [] - SerializedBytesString: - Prefab: {fileID: 0} - PrefabModificationsReferencedUnityObjects: [] - PrefabModifications: [] - SerializationNodes: - - Name: fieldDefinitions - Entry: 7 - Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, - UdonSharp.Editor]], mscorlib - - Name: comparer - Entry: 7 - Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, - mscorlib]], mscorlib - - Name: - Entry: 8 - Data: - - Name: - Entry: 12 - Data: 2 - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: toggleObject - - Name: $v - Entry: 7 - Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: toggleObject - - Name: k__BackingField - Entry: 7 - Data: 3|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: UnityEngine.GameObject, UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: isEnabled - - Name: $v - Entry: 7 - Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: isEnabled - - Name: k__BackingField - Entry: 7 - Data: 6|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: System.Boolean, mscorlib - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 6 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 3 - Data: 1 - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 8|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: diff --git a/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.asset.meta b/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.asset.meta deleted file mode 100644 index cc28257..0000000 --- a/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 96ee11c7074d21e4f84d189ad35d45fc -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.cs b/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.cs deleted file mode 100644 index 513403a..0000000 --- a/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.cs +++ /dev/null @@ -1,43 +0,0 @@ - -using UnityEngine; -using VRC.SDK3.Components; -using VRC.SDKBase; -using VRC.Udon; - -namespace UdonSharp.Examples.Utilities -{ - /// - /// This class allows anyone to toggle a gameobject for everyone in the world. - /// This script assumes that the object it is on will not have other things transferring ownership of it. - /// - [UdonBehaviourSyncMode(BehaviourSyncMode.Manual)] - public class GlobalToggleObject : UdonSharpBehaviour - { - public GameObject toggleObject; - - [UdonSynced] - bool isEnabled; - - private void Start() - { - isEnabled = toggleObject.activeSelf; - } - - public override void OnDeserialization() - { - if (!Networking.IsOwner(gameObject)) - toggleObject.SetActive(isEnabled); - } - - public override void Interact() - { - if (!Networking.IsOwner(gameObject)) - Networking.SetOwner(Networking.LocalPlayer, gameObject); - - isEnabled = !isEnabled; - toggleObject.SetActive(isEnabled); - - RequestSerialization(); - } - } -} diff --git a/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.cs.meta b/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.cs.meta deleted file mode 100644 index 5eb0355..0000000 --- a/Assets/UdonSharp/UtilityScripts/Synced/GlobalToggleObject.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a3d8ddeb56f3a0c4daf49fe9d7447a3e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.asset b/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.asset deleted file mode 100644 index 901d05e..0000000 --- a/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.asset +++ /dev/null @@ -1,167 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} - m_Name: MasterToggleObject - m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: 04024a76ab1924042ba521e11cb76d91, - type: 2} - udonAssembly: - assemblyError: - sourceCsScript: {fileID: 11500000, guid: fe5e5216dff1add40961bf62f441e92d, type: 3} - scriptVersion: 2 - compiledVersion: 2 - behaviourSyncMode: 4 - hasInteractEvent: 1 - scriptID: -8678189633964288851 - serializationData: - SerializedFormat: 2 - SerializedBytes: - ReferencedUnityObjects: [] - SerializedBytesString: - Prefab: {fileID: 0} - PrefabModificationsReferencedUnityObjects: [] - PrefabModifications: [] - SerializationNodes: - - Name: fieldDefinitions - Entry: 7 - Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, - UdonSharp.Editor]], mscorlib - - Name: comparer - Entry: 7 - Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, - mscorlib]], mscorlib - - Name: - Entry: 8 - Data: - - Name: - Entry: 12 - Data: 2 - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: toggleObject - - Name: $v - Entry: 7 - Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: toggleObject - - Name: k__BackingField - Entry: 7 - Data: 3|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: UnityEngine.GameObject, UnityEngine.CoreModule - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: isObjectEnabled - - Name: $v - Entry: 7 - Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: isObjectEnabled - - Name: k__BackingField - Entry: 7 - Data: 6|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: System.Boolean, mscorlib - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 6 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 3 - Data: 1 - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 8|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: diff --git a/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.asset.meta b/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.asset.meta deleted file mode 100644 index 504891a..0000000 --- a/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a3b924aa5d416d94c86ddd019ccb8441 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.cs b/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.cs deleted file mode 100644 index d74ceda..0000000 --- a/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.cs +++ /dev/null @@ -1,47 +0,0 @@ - -using UnityEngine; -using VRC.SDKBase; - -namespace UdonSharp.Examples.Utilities -{ - /// - /// Allows the master and only the master to toggle a game object globally - /// - [UdonBehaviourSyncMode(BehaviourSyncMode.Manual)] - public class MasterToggleObject : UdonSharpBehaviour - { - public GameObject toggleObject; - - [UdonSynced] - bool isObjectEnabled; - - private void Start() - { - isObjectEnabled = toggleObject.activeSelf; - } - - // Prevents people who are not the master from taking ownership - public override bool OnOwnershipRequest(VRCPlayerApi requestingPlayer, VRCPlayerApi requestedOwner) - { - return requestedOwner.isMaster; - } - - public override void OnDeserialization() - { - toggleObject.SetActive(isObjectEnabled); - } - - public override void Interact() - { - if (!Networking.IsMaster) - return; - else if (!Networking.IsOwner(gameObject)) // The object may have transfer ownership on collision checked which would allow people to take ownership by accident - Networking.SetOwner(Networking.LocalPlayer, gameObject); - - isObjectEnabled = !isObjectEnabled; - toggleObject.SetActive(isObjectEnabled); - - RequestSerialization(); - } - } -} diff --git a/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.cs.meta b/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.cs.meta deleted file mode 100644 index 3934b83..0000000 --- a/Assets/UdonSharp/UtilityScripts/Synced/MasterToggleObject.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fe5e5216dff1add40961bf62f441e92d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.asset b/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.asset deleted file mode 100644 index da92932..0000000 --- a/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.asset +++ /dev/null @@ -1,215 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} - m_Name: TrackingDataFollower - m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: 17f8fbbe6cc186d4f8dbb057b01a4ec2, - type: 2} - udonAssembly: - assemblyError: - sourceCsScript: {fileID: 11500000, guid: cfa6b6afca5fc44419a259edec93cea2, type: 3} - scriptVersion: 2 - compiledVersion: 2 - behaviourSyncMode: 2 - hasInteractEvent: 0 - scriptID: -3652176807635059362 - serializationData: - SerializedFormat: 2 - SerializedBytes: - ReferencedUnityObjects: [] - SerializedBytesString: - Prefab: {fileID: 0} - PrefabModificationsReferencedUnityObjects: [] - PrefabModifications: [] - SerializationNodes: - - Name: fieldDefinitions - Entry: 7 - Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, - UdonSharp.Editor]], mscorlib - - Name: comparer - Entry: 7 - Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, - mscorlib]], mscorlib - - Name: - Entry: 8 - Data: - - Name: - Entry: 12 - Data: 3 - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: trackingTarget - - Name: $v - Entry: 7 - Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: trackingTarget - - Name: k__BackingField - Entry: 7 - Data: 3|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: VRC.SDKBase.VRCPlayerApi+TrackingDataType, VRCSDKBase - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: playerApi - - Name: $v - Entry: 7 - Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: playerApi - - Name: k__BackingField - Entry: 7 - Data: 6|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: VRC.SDKBase.VRCPlayerApi, VRCSDKBase - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 6 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: isInEditor - - Name: $v - Entry: 7 - Data: 8|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: isInEditor - - Name: k__BackingField - Entry: 7 - Data: 9|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: System.Boolean, mscorlib - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 9 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: false - - Name: _fieldAttributes - Entry: 7 - Data: 10|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: diff --git a/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.asset.meta b/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.asset.meta deleted file mode 100644 index aba1add..0000000 --- a/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5463afdb73b505649b857341d262468a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.cs b/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.cs deleted file mode 100644 index 08a2766..0000000 --- a/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.cs +++ /dev/null @@ -1,35 +0,0 @@ - -using UnityEngine; -using VRC.SDKBase; - -namespace UdonSharp.Examples.Utilities -{ - /// - /// Follows one of the chosen playerApi tracking targets - /// - [AddComponentMenu("Udon Sharp/Utilities/Tracking Data Follower")] - [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] - public class TrackingDataFollower : UdonSharpBehaviour - { - public VRCPlayerApi.TrackingDataType trackingTarget; - - VRCPlayerApi playerApi; - bool isInEditor; - - private void Start() - { - playerApi = Networking.LocalPlayer; - isInEditor = playerApi == null; // PlayerApi will be null in editor - } - - private void LateUpdate() - { - // PlayerApi data will only be valid in game so we don't run the update if we're in editor - if (isInEditor) - return; - - VRCPlayerApi.TrackingData trackingData = playerApi.GetTrackingData(trackingTarget); - transform.SetPositionAndRotation(trackingData.position, trackingData.rotation); - } - } -} diff --git a/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.cs.meta b/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.cs.meta deleted file mode 100644 index 2dece04..0000000 --- a/Assets/UdonSharp/UtilityScripts/TrackingDataFollower.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cfa6b6afca5fc44419a259edec93cea2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.asset b/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.asset deleted file mode 100644 index ee4621f..0000000 --- a/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.asset +++ /dev/null @@ -1,737 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} - m_Name: WorldAudioSettings - m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: 128d924a3066b7546b2d1c73e61006ab, - type: 2} - udonAssembly: - assemblyError: - sourceCsScript: {fileID: 11500000, guid: fdc09c11006c3474f91cfe7e809c9b96, type: 3} - scriptVersion: 2 - compiledVersion: 2 - behaviourSyncMode: 2 - hasInteractEvent: 0 - scriptID: 4777197845251309059 - serializationData: - SerializedFormat: 2 - SerializedBytes: - ReferencedUnityObjects: [] - SerializedBytesString: - Prefab: {fileID: 0} - PrefabModificationsReferencedUnityObjects: [] - PrefabModifications: [] - SerializationNodes: - - Name: fieldDefinitions - Entry: 7 - Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, - UdonSharp.Editor]], mscorlib - - Name: comparer - Entry: 7 - Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, - mscorlib]], mscorlib - - Name: - Entry: 8 - Data: - - Name: - Entry: 12 - Data: 11 - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: voiceGain - - Name: $v - Entry: 7 - Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: voiceGain - - Name: k__BackingField - Entry: 7 - Data: 3|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: System.Single, mscorlib - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 3 - - Name: - Entry: 7 - Data: 5|UnityEngine.HeaderAttribute, UnityEngine.CoreModule - - Name: header - Entry: 1 - Data: Player voice - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: 6|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: Adjusts the player volume - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: 7|UnityEngine.RangeAttribute, UnityEngine.CoreModule - - Name: min - Entry: 4 - Data: 0 - - Name: max - Entry: 4 - Data: 24 - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: voiceFar - - Name: $v - Entry: 7 - Data: 8|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: voiceFar - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 9|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 10|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: The end of the range for hearing a user's voice - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: voiceNear - - Name: $v - Entry: 7 - Data: 11|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: voiceNear - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 12|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 13|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: The near radius in meters where player audio starts to fall off, it is - recommended to keep this at 0 - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: voiceVolumetricRadius - - Name: $v - Entry: 7 - Data: 14|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: voiceVolumetricRadius - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 16|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: The volumetric radius for the player voice, this should be left at 0 - unless you know what you're doing - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: voiceDisableLowpass - - Name: $v - Entry: 7 - Data: 17|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: voiceDisableLowpass - - Name: k__BackingField - Entry: 7 - Data: 18|System.RuntimeType, mscorlib - - Name: - Entry: 1 - Data: System.Boolean, mscorlib - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 9 - Data: 18 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 19|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 20|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: Disables the low-pass filter when players are far away - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: avatarMaxAudioGain - - Name: $v - Entry: 7 - Data: 21|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: avatarMaxAudioGain - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 22|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 3 - - Name: - Entry: 7 - Data: 23|UnityEngine.HeaderAttribute, UnityEngine.CoreModule - - Name: header - Entry: 1 - Data: Avatar audio - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: 24|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: The maximum gain allowed on avatar audio sources - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: 25|UnityEngine.RangeAttribute, UnityEngine.CoreModule - - Name: min - Entry: 4 - Data: 0 - - Name: max - Entry: 4 - Data: 10 - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: avatarMaxFarRadius - - Name: $v - Entry: 7 - Data: 26|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: avatarMaxFarRadius - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 27|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 28|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: The maximum end of avatar audio range, a value of 0 will effectively - mute avatar audio - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: avatarMaxNearRadius - - Name: $v - Entry: 7 - Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: avatarMaxNearRadius - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 30|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 31|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: The maximum for the radius where avatar audio starts to fall off - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: avatarMaxVolumetricRadius - - Name: $v - Entry: 7 - Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: avatarMaxVolumetricRadius - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 9 - Data: 3 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 33|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 34|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: The max volumetric radius for avatar audio sources - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: avatarForceSpacialization - - Name: $v - Entry: 7 - Data: 35|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: avatarForceSpacialization - - Name: k__BackingField - Entry: 9 - Data: 18 - - Name: k__BackingField - Entry: 9 - Data: 18 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 36|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 37|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: Forces avatars to have spatialized audio - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 7 - Data: - - Name: $k - Entry: 1 - Data: avatarDisableCustomCurve - - Name: $v - Entry: 7 - Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor - - Name: k__BackingField - Entry: 1 - Data: avatarDisableCustomCurve - - Name: k__BackingField - Entry: 9 - Data: 18 - - Name: k__BackingField - Entry: 9 - Data: 18 - - Name: k__BackingField - Entry: 7 - Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib - - Name: - Entry: 6 - Data: - - Name: - Entry: 8 - Data: - - Name: k__BackingField - Entry: 5 - Data: true - - Name: _fieldAttributes - Entry: 7 - Data: 39|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib - - Name: - Entry: 12 - Data: 1 - - Name: - Entry: 7 - Data: 40|UnityEngine.TooltipAttribute, UnityEngine.CoreModule - - Name: tooltip - Entry: 1 - Data: Disables custom curves on avatar audio sources - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 8 - Data: - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: diff --git a/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.asset.meta b/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.asset.meta deleted file mode 100644 index 1e5ddf9..0000000 --- a/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fa52d8b703fd906459112715b1ef1f3a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.cs b/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.cs deleted file mode 100644 index 44e5bda..0000000 --- a/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.cs +++ /dev/null @@ -1,76 +0,0 @@ - -using UnityEngine; -using VRC.SDK3.Components; -using VRC.SDKBase; -using VRC.Udon; - -namespace UdonSharp.Examples.Utilities -{ - /// - /// Sets the default voice and avatar audio settings for players when they enter the world - /// See https://docs.vrchat.com/docs/player-audio for more detailed documentation - /// - [AddComponentMenu("Udon Sharp/Utilities/World Audio Settings")] - [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] - public class WorldAudioSettings : UdonSharpBehaviour - { - [Header("Player voice")] - [Tooltip("Adjusts the player volume")] - [Range(0f, 24f)] - public float voiceGain = 15f; - - [Tooltip("The end of the range for hearing a user's voice")] - public float voiceFar = 25f; - - [Tooltip("The near radius in meters where player audio starts to fall off, it is recommended to keep this at 0")] - public float voiceNear = 0f; - - [Tooltip("The volumetric radius for the player voice, this should be left at 0 unless you know what you're doing")] - public float voiceVolumetricRadius = 0f; - - [Tooltip("Disables the low-pass filter when players are far away")] - public bool voiceDisableLowpass = false; - - [Header("Avatar audio")] - [Tooltip("The maximum gain allowed on avatar audio sources")] - [Range(0f, 10f)] - public float avatarMaxAudioGain = 10f; - - [Tooltip("The maximum end of avatar audio range, a value of 0 will effectively mute avatar audio")] - public float avatarMaxFarRadius = 40f; - - // I don't think the docs are accurate for this one, they say it's for the maximum radius where you can start to hear an audio source - [Tooltip("The maximum for the radius where avatar audio starts to fall off")] - public float avatarMaxNearRadius = 40f; - - [Tooltip("The max volumetric radius for avatar audio sources")] - public float avatarMaxVolumetricRadius = 40f; - - [Tooltip("Forces avatars to have spatialized audio")] - public bool avatarForceSpacialization = false; - - [Tooltip("Disables custom curves on avatar audio sources")] - public bool avatarDisableCustomCurve = false; - - public override void OnPlayerJoined(VRCPlayerApi player) - { - if (!player.isLocal) - { - // Player voice - player.SetVoiceGain(voiceGain); - player.SetVoiceDistanceFar(voiceFar); - player.SetVoiceDistanceNear(voiceNear); - player.SetVoiceVolumetricRadius(voiceVolumetricRadius); - player.SetVoiceLowpass(!voiceDisableLowpass); - - // Avatar audio - player.SetAvatarAudioGain(avatarMaxAudioGain); - player.SetAvatarAudioFarRadius(avatarMaxFarRadius); - player.SetAvatarAudioNearRadius(avatarMaxNearRadius); - player.SetAvatarAudioVolumetricRadius(avatarMaxVolumetricRadius); - player.SetAvatarAudioForceSpatial(avatarForceSpacialization); - player.SetAvatarAudioCustomCurve(!avatarDisableCustomCurve); - } - } - } -} diff --git a/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.cs.meta b/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.cs.meta deleted file mode 100644 index 8230e2b..0000000 --- a/Assets/UdonSharp/UtilityScripts/WorldAudioSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fdc09c11006c3474f91cfe7e809c9b96 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: