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

Version Num Update

This commit is contained in:
AcChosen 2023-08-30 20:17:47 -04:00
parent 3a5e946c1b
commit f500d83345
4 changed files with 49 additions and 8 deletions

View File

@ -2,6 +2,7 @@
using System.Reflection;
using UnityEditor;
using UnityEngine;
using System.IO;
// Based on Morioh's toon shader GUI.
// This code is based off synqark's arktoon-shaders and Xiexe.
@ -359,7 +360,7 @@ public class VRSLInspector : ShaderGUI
EditorGUI.BeginChangeCheck();
{
VRSLStyles.DrawLogo();
VRSLStyles.ShurikenHeaderCentered(VRSLStyles.ver);
VRSLStyles.ShurikenHeaderCentered(VRSLStyles.GetVersion());
VRSLStyles.ShurikenHeaderCentered(GetShaderType());
VRSLStyles.PartingLine();
VRSLStyles.DepthPassWarning();

View File

@ -1,6 +1,7 @@
#if !COMPILER_UDONSHARP && UNITY_EDITOR
using UnityEngine;
using UnityEditor;
using System.IO;
// help link https://docs.unity3d.com/ScriptReference/EditorStyles.html
// ---DISCLAIMER--- THIS CODE IS BASED OFF OF "SYNQARK"'s ARKTOON-SHADERS AND "XIEXE"'s UNITY-SHADERS. FOR MORE INFORMATION PLEASE REFER TO THE ORIGINAL BASE WRITER "https://github.com/synqark", "https://github.com/synqark/Arktoon-Shaders" or "https://github.com/Xiexe", "https://github.com/Xiexe/Xiexes-Unity-Shaders"
@ -10,12 +11,24 @@ public class VRSLStyles : MonoBehaviour
{
public static Texture logo = Resources.Load("VRStageLighting-Logo") as Texture;
public static string ver = "VR Stage Lighting ver:" + " <b><color=#6a15ce> 2.4.1</color></b>";
//public static string ver = "VR Stage Lighting ver:" + " <b><color=#6a15ce> 2.4.1</color></b>";
public static void DepthPassWarning()
{
EditorGUILayout.HelpBox("Shader looking weird? \nPlease ensure that the depth texture is enabled by having the included 'Directional Light' prefab somewhere in your scene, located in \nAssets/VRStageLighting/VR-Stage-Lighting/Other", MessageType.Info);
}
public 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 = "VRSL GI ver:" + " <b><color=#b33cff>" + versionNum + "</color></b>";
return ver;
}
public static void DrawLogo()
{

View File

@ -19,6 +19,7 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using UnityEngine.UIElements;
using System.IO;
#endif
#if !COMPILER_UDONSHARP && UNITY_EDITOR
@ -601,7 +602,7 @@ public class VRSL_ManagerWindow : EditorWindow {
static float tiltRangeOff = -180f;
public static Texture logo, github, twitter, discord;
public bool legacyFixtures;
public static string ver = "VR Stage Lighting ver:" + " <b><color=#6a15ce> 2.4.1</color></b>";
//public static string ver = "VR Stage Lighting ver:" + " <b><color=#6a15ce> 2.4.1</color></b>";
public static bool hasLocalPanel, hasDepthLight;
private static VRSL_LocalUIControlPanel panel;
@ -701,6 +702,19 @@ public class VRSL_ManagerWindow : EditorWindow {
}
public 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 = "VRSL GI ver:" + " <b><color=#b33cff>" + versionNum + "</color></b>";
return ver;
}
static bool CheckIfDMXGIAvailable()
{
string path = "Packages/com.acchosen.vrsl-dmx-gi/Runtime/Shaders/VRSL_GI_LightTexture.shader";
@ -2385,7 +2399,7 @@ public class VRSL_ManagerWindow : EditorWindow {
void OnGUI() {
DrawLogo();
ShurikenHeaderCentered(ver);
ShurikenHeaderCentered(GetVersion());
GUILayout.Label("Control Panel",Title1());
if(Application.isPlaying)

View File

@ -14,6 +14,7 @@ using VRC.Udon.Common;
using VRC.Udon.Common.Interfaces;
using System.Collections.Immutable;
using System;
using System.IO;
#endif
@ -23,11 +24,23 @@ namespace VRSL.EditorScripts
public class VRSL_UdonEditor : Editor
{
public static Texture logo;
public static string ver = "VR Stage Lighting ver:" + " <b><color=#6a15ce> 2.4</color></b>";
// public static string ver = "VR Stage Lighting ver:" + " <b><color=#6a15ce> 2.4</color></b>";
public void OnEnable()
{
logo = Resources.Load("VRStageLighting-Logo") as Texture;
}
public 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 = "VRSL GI ver:" + " <b><color=#b33cff>" + versionNum + "</color></b>";
return ver;
}
public static void DrawLogo()
{
Vector2 contentOffset = new Vector2(0f, -2f);
@ -146,7 +159,7 @@ namespace VRSL.EditorScripts
serializedObject.Update();
if (UdonSharpGUI.DrawDefaultUdonSharpBehaviourHeader(target)) return;
DrawLogo();
ShurikenHeaderCentered(ver);
ShurikenHeaderCentered(GetVersion());
EditorGUILayout.Space();
EditorGUILayout.Space();
//EditorGUILayout.Space();
@ -316,7 +329,7 @@ namespace VRSL.EditorScripts
{
if (UdonSharpGUI.DrawDefaultUdonSharpBehaviourHeader(target)) return;
DrawLogo();
ShurikenHeaderCentered(ver);
ShurikenHeaderCentered(GetVersion());
EditorGUILayout.Space();
EditorGUILayout.Space();
@ -394,7 +407,7 @@ namespace VRSL.EditorScripts
{
if (UdonSharpGUI.DrawDefaultUdonSharpBehaviourHeader(target)) return;
DrawLogo();
ShurikenHeaderCentered(ver);
ShurikenHeaderCentered(GetVersion());
EditorGUILayout.Space();
EditorGUILayout.Space();