Browse Source

Adding voice modifier script

master
Mobius K 3 months ago
parent
commit
70a666109a
  1. 8
      Assets/Arcade/Scripts.meta
  2. 265
      Assets/Arcade/Scripts/Voice volume modifier.asset
  3. 8
      Assets/Arcade/Scripts/Voice volume modifier.asset.meta
  4. 24
      Assets/Scenes/Arcade public assets.unity
  5. 4
      ProjectSettings/ProjectSettings.asset

8
Assets/Arcade/Scripts.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2d5ce1ca59c38674fa6e5e4a6ebc8b40
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

265
Assets/Arcade/Scripts/Voice volume modifier.asset

@ -0,0 +1,265 @@
%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: 4f11136daadff0b44ac2278a314682ab, type: 3}
m_Name: Voice volume modifier
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 09551ffb95c54264ab0a3cfbacdce8b8,
type: 2}
udonAssembly: ".data_start\r\n\r\n .export Gain\r\n .export VoiceDistanceFar\r\n
\ .export LowPassFilter\r\n \r\n instance_0: %VRCSDKBaseVRCPlayerApi,
null\r\n gain_0: %SystemSingle, null\r\n onPlayerTriggerEnterPlayer: %VRCSDKBaseVRCPlayerApi,
null\r\n instance_1: %VRCSDKBaseVRCPlayerApi, null\r\n far_0: %SystemSingle,
null\r\n instance_2: %VRCSDKBaseVRCPlayerApi, null\r\n enabled_0: %SystemBoolean,
null\r\n instance_3: %VRCSDKBaseVRCPlayerApi, null\r\n gain_1: %SystemSingle,
null\r\n onPlayerTriggerExitPlayer: %VRCSDKBaseVRCPlayerApi, null\r\n instance_4:
%VRCSDKBaseVRCPlayerApi, null\r\n far_1: %SystemSingle, null\r\n instance_5:
%VRCSDKBaseVRCPlayerApi, null\r\n enabled_1: %SystemBoolean, null\r\n Gain:
%SystemSingle, null\r\n VoiceDistanceFar: %SystemSingle, null\r\n LowPassFilter:
%SystemBoolean, null\r\n\r\n.data_end\r\n\r\n.code_start\r\n\r\n .export _onPlayerTriggerEnter\r\n
\ \r\n _onPlayerTriggerEnter:\r\n \r\n PUSH, onPlayerTriggerEnterPlayer\r\n
\ PUSH, instance_0\r\n COPY\r\n PUSH, instance_0\r\n PUSH,
Gain\r\n EXTERN, \"VRCSDKBaseVRCPlayerApi.__SetVoiceGain__SystemSingle__SystemVoid\"\r\n
\ PUSH, onPlayerTriggerEnterPlayer\r\n PUSH, instance_1\r\n COPY\r\n
\ PUSH, instance_1\r\n PUSH, VoiceDistanceFar\r\n EXTERN,
\"VRCSDKBaseVRCPlayerApi.__SetVoiceDistanceFar__SystemSingle__SystemVoid\"\r\n
\ PUSH, onPlayerTriggerEnterPlayer\r\n PUSH, instance_2\r\n COPY\r\n
\ PUSH, instance_2\r\n PUSH, LowPassFilter\r\n EXTERN, \"VRCSDKBaseVRCPlayerApi.__SetVoiceLowpass__SystemBoolean__SystemVoid\"\r\n
\ JUMP, 0xFFFFFFFC\r\n \r\n .export _onPlayerTriggerExit\r\n \r\n
\ _onPlayerTriggerExit:\r\n \r\n PUSH, onPlayerTriggerExitPlayer\r\n
\ PUSH, instance_3\r\n COPY\r\n PUSH, instance_3\r\n PUSH,
gain_1\r\n EXTERN, \"VRCSDKBaseVRCPlayerApi.__SetVoiceGain__SystemSingle__SystemVoid\"\r\n
\ PUSH, onPlayerTriggerExitPlayer\r\n PUSH, instance_4\r\n COPY\r\n
\ PUSH, instance_4\r\n PUSH, far_1\r\n EXTERN, \"VRCSDKBaseVRCPlayerApi.__SetVoiceDistanceFar__SystemSingle__SystemVoid\"\r\n
\ PUSH, onPlayerTriggerExitPlayer\r\n PUSH, instance_5\r\n COPY\r\n
\ PUSH, instance_5\r\n PUSH, enabled_1\r\n EXTERN, \"VRCSDKBaseVRCPlayerApi.__SetVoiceLowpass__SystemBoolean__SystemVoid\"\r\n
\ JUMP, 0xFFFFFFFC\r\n \r\n\r\n.code_end\r\n"
assemblyError:
graphData:
name:
description:
nodes:
- fullName: Event_OnPlayerTriggerEnter
uid: c53d6635-48fc-45c4-a945-2fc99581bdf2
position: {x: 10.523861, y: 518.89624}
nodeUIDs: []
flowUIDs:
- 60ba612e-0d18-426d-8697-50eb465a9448
nodeValues: []
- fullName: Event_OnPlayerTriggerExit
uid: 5593ff8f-3d3d-4c48-97dd-492a382c9560
position: {x: 10.292306, y: 1068.282}
nodeUIDs: []
flowUIDs:
- 4376773a-0672-49b0-85c6-4b4b36535282
nodeValues: []
- fullName: VRCSDKBaseVRCPlayerApi.__SetVoiceLowpass__SystemBoolean__SystemVoid
uid: 5011d291-e6d1-4f01-b382-e97bfcf271d3
position: {x: 663.652, y: 618.5825}
nodeUIDs:
- c53d6635-48fc-45c4-a945-2fc99581bdf2|0
- 7bacc19b-b834-4734-abeb-12571c4b7ed0|0
flowUIDs:
-
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue:
- unityObjectValue: {fileID: 0}
stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|False
- fullName: VRCSDKBaseVRCPlayerApi.__SetVoiceGain__SystemSingle__SystemVoid
uid: 60ba612e-0d18-426d-8697-50eb465a9448
position: {x: 305.3994, y: 437.00342}
nodeUIDs:
- c53d6635-48fc-45c4-a945-2fc99581bdf2|0
- 8505faa8-12f9-41dc-92a1-6fdf9316e9b9|0
flowUIDs:
- facb1dc0-31c2-406b-9a1e-d7b594d6d5b5
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue:
- unityObjectValue: {fileID: 0}
stringValue: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|3
- fullName: VRCSDKBaseVRCPlayerApi.__SetVoiceDistanceFar__SystemSingle__SystemVoid
uid: facb1dc0-31c2-406b-9a1e-d7b594d6d5b5
position: {x: 461.8313, y: 520.5023}
nodeUIDs:
- c53d6635-48fc-45c4-a945-2fc99581bdf2|0
- 5a7f83b4-7729-433d-b80f-86f071e807b2|0
flowUIDs:
- 5011d291-e6d1-4f01-b382-e97bfcf271d3
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue:
- unityObjectValue: {fileID: 0}
stringValue: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|80
- fullName: Variable_SystemSingle
uid: 6ffd80d7-6c17-4fc5-85d2-72d7f65ff3e3
position: {x: -362.28818, y: -756.089}
nodeUIDs:
-
-
-
-
-
flowUIDs: []
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|19
- unityObjectValue: {fileID: 0}
stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Gain
- unityObjectValue: {fileID: 0}
stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|True
- unityObjectValue: {fileID: 0}
stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|False
- unityObjectValue: {fileID: 0}
stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|none
- fullName: Get_Variable
uid: 8505faa8-12f9-41dc-92a1-6fdf9316e9b9
position: {x: 155.80064, y: 632.52783}
nodeUIDs:
-
flowUIDs: []
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|6ffd80d7-6c17-4fc5-85d2-72d7f65ff3e3
- fullName: Variable_SystemSingle
uid: d32b4772-8781-4432-858a-0aac8960b12c
position: {x: -362.28818, y: -756.089}
nodeUIDs:
-
-
-
-
-
flowUIDs: []
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|80
- unityObjectValue: {fileID: 0}
stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|VoiceDistanceFar
- unityObjectValue: {fileID: 0}
stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|True
- unityObjectValue: {fileID: 0}
stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|False
- unityObjectValue: {fileID: 0}
stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|none
- fullName: Get_Variable
uid: 5a7f83b4-7729-433d-b80f-86f071e807b2
position: {x: 249.7501, y: 731.86536}
nodeUIDs:
-
flowUIDs: []
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|d32b4772-8781-4432-858a-0aac8960b12c
- fullName: Variable_SystemBoolean
uid: 7d319828-7ed6-44ce-aff5-358fba4bb0e9
position: {x: -362.28818, y: -756.089}
nodeUIDs:
-
-
-
-
-
flowUIDs: []
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue:
- unityObjectValue: {fileID: 0}
stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|LowPassFilter
- unityObjectValue: {fileID: 0}
stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|True
- unityObjectValue: {fileID: 0}
stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|False
- unityObjectValue: {fileID: 0}
stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|none
- fullName: Get_Variable
uid: 7bacc19b-b834-4734-abeb-12571c4b7ed0
position: {x: 465.44525, y: 774.5858}
nodeUIDs:
-
flowUIDs: []
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|7d319828-7ed6-44ce-aff5-358fba4bb0e9
- fullName: VRCSDKBaseVRCPlayerApi.__SetVoiceGain__SystemSingle__SystemVoid
uid: 4376773a-0672-49b0-85c6-4b4b36535282
position: {x: 296.25125, y: 986.6677}
nodeUIDs:
- 5593ff8f-3d3d-4c48-97dd-492a382c9560|0
-
flowUIDs:
- 528f56b1-f2fe-4585-8792-3bc7f5c53fda
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue:
- unityObjectValue: {fileID: 0}
stringValue: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|15
- fullName: VRCSDKBaseVRCPlayerApi.__SetVoiceDistanceFar__SystemSingle__SystemVoid
uid: 528f56b1-f2fe-4585-8792-3bc7f5c53fda
position: {x: 458.95493, y: 1070.2031}
nodeUIDs:
- 5593ff8f-3d3d-4c48-97dd-492a382c9560|0
-
flowUIDs:
- a46ac52a-05d5-4512-847c-4ab33f66879a
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue:
- unityObjectValue: {fileID: 0}
stringValue: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|25
- fullName: VRCSDKBaseVRCPlayerApi.__SetVoiceLowpass__SystemBoolean__SystemVoid
uid: a46ac52a-05d5-4512-847c-4ab33f66879a
position: {x: 661.19574, y: 1161.9082}
nodeUIDs:
- 5593ff8f-3d3d-4c48-97dd-492a382c9560|0
-
flowUIDs:
-
nodeValues:
- unityObjectValue: {fileID: 0}
stringValue:
- unityObjectValue: {fileID: 0}
stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|False
updateOrder: 0
graphElementData:
- type: 2
uid: ce7ce0fc-d932-47cc-bc35-337a230dc64a
jsonData: '{"uid":"ce7ce0fc-d932-47cc-bc35-337a230dc64a","layout":{"serializedVersion":"2","x":-14.476144790649414,"y":373.00341796875,"width":866.0,"height":510.0},"containedElements":["8505faa8-12f9-41dc-92a1-6fdf9316e9b9","facb1dc0-31c2-406b-9a1e-d7b594d6d5b5","60ba612e-0d18-426d-8697-50eb465a9448","5011d291-e6d1-4f01-b382-e97bfcf271d3","c53d6635-48fc-45c4-a945-2fc99581bdf2","5a7f83b4-7729-433d-b80f-86f071e807b2","7bacc19b-b834-4734-abeb-12571c4b7ed0"],"title":"Entering
box collider trigger","layer":0,"elementTypeColor":{"r":0.0,"g":0.0,"b":0.0,"a":0.0}}'
- type: 2
uid: 9d6f3a55-677b-47ea-90df-01f9be85e798
jsonData: '{"uid":"9d6f3a55-677b-47ea-90df-01f9be85e798","layout":{"serializedVersion":"2","x":-14.707703590393067,"y":922.6677856445313,"width":864.0,"height":395.0},"containedElements":["a46ac52a-05d5-4512-847c-4ab33f66879a","528f56b1-f2fe-4585-8792-3bc7f5c53fda","4376773a-0672-49b0-85c6-4b4b36535282","5593ff8f-3d3d-4c48-97dd-492a382c9560"],"title":"Leaving
box collider trigger","layer":0,"elementTypeColor":{"r":0.0,"g":0.0,"b":0.0,"a":0.0}}'
- type: 3
uid: 0c9274d8-123a-4d13-8615-5bc234940cf6
jsonData: '{"uid":"0c9274d8-123a-4d13-8615-5bc234940cf6","layout":{"serializedVersion":"2","x":-301.0011291503906,"y":374.4773254394531,"width":258.9275817871094,"height":159.02499389648438},"title":"Gain:
Default 15, range 0 (muted) to 24 (very loud).","layer":0,"elementTypeColor":{"r":0.0,"g":0.0,"b":0.0,"a":0.0}}'
- type: 3
uid: 7670281f-91c5-4cfd-a549-d59407852d99
jsonData: '{"uid":"7670281f-91c5-4cfd-a549-d59407852d99","layout":{"serializedVersion":"2","x":-301.1611022949219,"y":557.4361572265625,"width":256.28253173828127,"height":132.57501220703126},"title":"VoiceDistanceFar:
Default 25, range 0 (muted) to infinite. At this distance, voice will be pretty
far away.","layer":0,"elementTypeColor":{"r":0.0,"g":0.0,"b":0.0,"a":0.0}}'
- type: 3
uid: ca7946c7-5a0a-403d-99e9-423255f16fe3
jsonData: '{"uid":"ca7946c7-5a0a-403d-99e9-423255f16fe3","layout":{"serializedVersion":"2","x":-304.70208740234377,"y":719.2506713867188,"width":264.217529296875,"height":99.51250457763672},"title":"LowPassFilter:If
on, turns audio into \"crowd noise\" starting at half of VoiceDistanceFar.","layer":0,"elementTypeColor":{"r":0.0,"g":0.0,"b":0.0,"a":0.0}}'
- type: 5
uid: a6290d75-9183-4e98-96d8-0186b71e8f12
jsonData: '{"visible":true,"layout":{"serializedVersion":"2","x":16.0,"y":37.0,"width":200.0,"height":150.0}}'
- type: 4
uid: 48f42e21-a1e2-48dc-8509-118989a8ff3b
jsonData: '{"visible":false,"layout":{"serializedVersion":"2","x":10.0,"y":20.0,"width":0.0,"height":0.0}}'
viewTransform:
position: {x: 447.7838, y: -11.681}
scale: 0.43232757
version: 1.0.0
showAssembly: 0

8
Assets/Arcade/Scripts/Voice volume modifier.asset.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 862d0d7b690cc6e4b8697e4b1e229aff
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

24
Assets/Scenes/Arcade public assets.unity

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 170076734}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@ -50,7 +50,6 @@ LightmapSettings:
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
@ -117,7 +116,8 @@ NavMeshSettings:
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 170076735}
@ -133,7 +133,8 @@ GameObject:
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 170076733}
m_Enabled: 1
serializedVersion: 8
@ -170,7 +171,8 @@ Light:
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 170076733}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
@ -183,7 +185,8 @@ Transform:
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 534669905}
@ -200,14 +203,16 @@ GameObject:
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 534669902}
m_Enabled: 1
--- !u!20 &534669904
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 534669902}
m_Enabled: 1
serializedVersion: 2
@ -248,7 +253,8 @@ Camera:
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 534669902}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}

4
ProjectSettings/ProjectSettings.asset

@ -294,13 +294,13 @@ PlayerSettings:
m_Automatic: 1
- m_BuildTarget: LinuxStandaloneSupport
m_APIs: 1100000015000000
m_Automatic: 0
m_Automatic: 1
- m_BuildTarget: WindowsStandaloneSupport
m_APIs: 02000000
m_Automatic: 0
- m_BuildTarget: MacStandaloneSupport
m_APIs: 1000000011000000
m_Automatic: 0
m_Automatic: 1
m_BuildTargetVRSettings:
- m_BuildTarget: Standalone
m_Enabled: 1

Loading…
Cancel
Save