diff --git a/Packages/com.acchosen.vr-stage-lighting/Runtime/Scripts/VRSL_LocalUIControlPanel.cs b/Packages/com.acchosen.vr-stage-lighting/Runtime/Scripts/VRSL_LocalUIControlPanel.cs index eb9defb..d7207b1 100644 --- a/Packages/com.acchosen.vr-stage-lighting/Runtime/Scripts/VRSL_LocalUIControlPanel.cs +++ b/Packages/com.acchosen.vr-stage-lighting/Runtime/Scripts/VRSL_LocalUIControlPanel.cs @@ -7,6 +7,9 @@ using VRC.Udon; #if !COMPILER_UDONSHARP && UNITY_EDITOR using UnityEditor; using UdonSharpEditor; +using System.Collections.Immutable; +using System; +using System.IO; #endif #if UDONSHARP @@ -1130,9 +1133,22 @@ namespace VRSL public class VRSL_LocalUIControlPanel_Editor : Editor { public static Texture logo; - public static string ver = "VR Stage Lighting ver:" + " 2.1"; + //public static string ver = "VR Stage Lighting ver:" + " 2.1"; SerializedProperty audioLinkLasers, audiolinkLights, dmxLights, isUsingDMX,isUsingAudioLink; + static string GetVersion() + { + string path = Application.dataPath; + path = path.Replace("Assets",""); + path += "Packages" + "\\" + "com.acchosen.vr-stage-lighting" + "\\"; + path += "Runtime" + "\\" + "VERSION.txt"; + + StreamReader reader = new StreamReader(path); + string versionNum = reader.ReadToEnd(); + string ver = "VR Stage Lighting ver:" + " " + versionNum + ""; + return ver; + } + public void OnEnable() { logo = Resources.Load("VRStageLighting-Logo") as Texture; @@ -1216,7 +1232,7 @@ namespace VRSL EditorGUI.BeginChangeCheck(); serializedObject.Update(); DrawLogo(); - ShurikenHeaderCentered(ver); + ShurikenHeaderCentered(GetVersion()); EditorGUILayout.Space(); VRSL_LocalUIControlPanel controlPanel = (VRSL_LocalUIControlPanel)target; if (GUILayout.Button(new GUIContent("Force Update Target AudioLink Sample Texture", "Updates all AudioLink VRSL Fixtures to sample from the selected target texture when texture sampling is enabled on the fixture."))) { controlPanel._ForceUpdateVideoSampleTexture(); } diff --git a/Packages/com.acchosen.vr-stage-lighting/Runtime/Scripts/VRStageLighting_DMX_Static.cs b/Packages/com.acchosen.vr-stage-lighting/Runtime/Scripts/VRStageLighting_DMX_Static.cs index c9983ec..74a687a 100644 --- a/Packages/com.acchosen.vr-stage-lighting/Runtime/Scripts/VRStageLighting_DMX_Static.cs +++ b/Packages/com.acchosen.vr-stage-lighting/Runtime/Scripts/VRStageLighting_DMX_Static.cs @@ -150,7 +150,7 @@ namespace VRSL } else { - Debug.Log("Please add atleast one fixture renderer."); + //Debug.Log("Please add atleast one fixture renderer."); //enableInstancing = false; } }