From 20ffe1f63ae3db905c9537f00e45113e15d044e3 Mon Sep 17 00:00:00 2001 From: MrTomato <58458857+mrTomatolegit@users.noreply.github.com> Date: Fri, 18 Oct 2024 02:18:38 +0200 Subject: [PATCH] fix audiolink laser handling in VRSL_ManagerWindow.cs If there is an audiolink laser in the scene and the user either: - Tries to `Update Fixtures` in the VRSL - Tries to open an audiolink band The console will print and error or spam errors respectively. This change prevents the errors without functionality. --- .../Editor/VRSL_ManagerWindow.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Packages/com.acchosen.vr-stage-lighting/Editor/VRSL_ManagerWindow.cs b/Packages/com.acchosen.vr-stage-lighting/Editor/VRSL_ManagerWindow.cs index 8cf53b4..2ab7a67 100644 --- a/Packages/com.acchosen.vr-stage-lighting/Editor/VRSL_ManagerWindow.cs +++ b/Packages/com.acchosen.vr-stage-lighting/Editor/VRSL_ManagerWindow.cs @@ -577,9 +577,9 @@ public class AudioLinkListItem laser.ApplyProxyModifications(); #pragma warning restore 0618 //suppressing obsoletion warnings - if(PrefabUtility.IsPartOfAnyPrefab(light)) + if(PrefabUtility.IsPartOfAnyPrefab(laser)) { - PrefabUtility.RecordPrefabInstancePropertyModifications(light); + PrefabUtility.RecordPrefabInstancePropertyModifications(laser); } } @@ -4193,6 +4193,10 @@ public class VRSL_ManagerWindow : EditorWindow { EditorGUILayout.EndFoldoutHeaderGroup(); } } + if(fixture.isLaser && PrefabUtility.IsPartOfAnyPrefab(fixture.laser)) + { + PrefabUtility.RecordPrefabInstancePropertyModifications(fixture.laser); + } else if(PrefabUtility.IsPartOfAnyPrefab(fixture.light)) { PrefabUtility.RecordPrefabInstancePropertyModifications(fixture.light);