Skip to content

Commit

Permalink
fix audiolink laser handling in VRSL_ManagerWindow.cs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mrTomatolegit authored Oct 18, 2024
1 parent 3e83cab commit 20ffe1f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,9 @@ public void ApplyChanges(VRStageLighting_AudioLink_Laser li)
laser.ApplyProxyModifications();
#pragma warning restore 0618 //suppressing obsoletion warnings

if(PrefabUtility.IsPartOfAnyPrefab(light))
if(PrefabUtility.IsPartOfAnyPrefab(laser))
{
PrefabUtility.RecordPrefabInstancePropertyModifications(light);
PrefabUtility.RecordPrefabInstancePropertyModifications(laser);
}
}

Expand Down Expand Up @@ -4193,6 +4193,10 @@ void OnGUI() {
EditorGUILayout.EndFoldoutHeaderGroup();
}
}
if(fixture.isLaser && PrefabUtility.IsPartOfAnyPrefab(fixture.laser))
{
PrefabUtility.RecordPrefabInstancePropertyModifications(fixture.laser);
} else
if(PrefabUtility.IsPartOfAnyPrefab(fixture.light))
{
PrefabUtility.RecordPrefabInstancePropertyModifications(fixture.light);
Expand Down

0 comments on commit 20ffe1f

Please sign in to comment.