1
0
mirror of https://github.com/AcChosen/VR-Stage-Lighting.git synced 2024-11-23 23:21:07 +01:00

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.
This commit is contained in:
MrTomato 2024-10-18 02:18:38 +02:00 committed by GitHub
parent 3e83cab152
commit 20ffe1f63a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);