diff --git a/Assets/Editor/ReplaceGvr.cs b/Assets/Editor/ReplaceGvr.cs index 6a28ad03db..65f72c7fc0 100644 --- a/Assets/Editor/ReplaceGvr.cs +++ b/Assets/Editor/ReplaceGvr.cs @@ -8,7 +8,7 @@ public class ReplaceGvr : Editor // Only used for console logging private static string currentSceneOrPrefabName; - + [MenuItem("Open Brush/Replace GoogleVR Audio")] public static void Run() { @@ -17,7 +17,7 @@ public static void Run() { var scene = SceneManager.GetSceneAt(i); EditorSceneManager.OpenScene(scene.path); - + currentSceneOrPrefabName = scene.name; foreach (GameObject obj in FindObjectsOfType(includeInactive: true)) { @@ -34,12 +34,12 @@ public static void Run() IteratePrefab(prefab.transform); } } - + private static void IteratePrefab(Transform transform) { currentSceneOrPrefabName = transform.name; FixAllGvr(transform.gameObject); - + foreach (Transform child in transform) { IteratePrefab(child); @@ -74,7 +74,7 @@ public static void FixGvrRoom(GameObject go) ResonanceAudioRoom resAudioRoom = null; if (go.GetComponent() == null) { - resAudioRoom = go.AddComponent(); + resAudioRoom = go.AddComponent(); Debug.Log($"Added ResonanceAudioRoom to {currentSceneOrPrefabName}.{go.name}"); } @@ -102,17 +102,17 @@ public static void FixGvrListener(GameObject go) resAudioListener = go.AddComponent(); Debug.Log($"Added ResonanceAudioListener to {currentSceneOrPrefabName}.{go.name}"); } - + resAudioListener.occlusionMask = gvr.occlusionMask; resAudioListener.globalGainDb = gvr.globalGainDb; // resAudioListener.??? = gvr.quality; } - + public static void FixGvrSource(GameObject go) { var gvr = go.GetComponent(); if (gvr == null) return; - + var audioSource = go.GetComponent(); if (audioSource == null) { @@ -141,7 +141,7 @@ public static void FixGvrSource(GameObject go) resAudioSource = go.AddComponent(); Debug.Log($"Added ResonanceAudioSource to {currentSceneOrPrefabName}.{go.name}"); } - + resAudioSource.directivityAlpha = gvr.directivityAlpha; resAudioSource.directivitySharpness = gvr.directivitySharpness; resAudioSource.listenerDirectivityAlpha = gvr.listenerDirectivityAlpha; diff --git a/Assets/Scripts/GvrStubs/GvrAudioSource.cs b/Assets/Scripts/GvrStubs/GvrAudioSource.cs index 2c206c8256..83110375be 100644 --- a/Assets/Scripts/GvrStubs/GvrAudioSource.cs +++ b/Assets/Scripts/GvrStubs/GvrAudioSource.cs @@ -4,7 +4,7 @@ public class GvrAudioSource : MonoBehaviour { - + /// Denotes whether the room effects should be bypassed. public bool bypassRoomEffects = false;