#if UNITY_EDITOR using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; namespace SpriteShadersUltimate { [CustomEditor(typeof(UnscaledTimeSSU))] [CanEditMultipleObjects] public class UnscaledTimeSSUEditor : Editor { public override void OnInspectorGUI() { //Properties: EditorGUILayout.PropertyField(serializedObject.FindProperty("dontDestroyOnLoad")); serializedObject.ApplyModifiedProperties(); EditorGUILayout.Space(); //Additional Information: GUIStyle labelStyle = new GUIStyle(GUI.skin.label); labelStyle.richText = true; EditorGUILayout.BeginVertical("Helpbox"); GUI.color = new Color(1, 1, 1, 0.7f); EditorGUILayout.LabelField("Allows you to use unscaled time in SSU shaders.", labelStyle); EditorGUILayout.LabelField("Attach this to any gameobject.", labelStyle); EditorGUILayout.LabelField("You only need one of this component in your scene.", labelStyle); GUI.color = Color.white; EditorGUILayout.EndVertical(); EditorGUILayout.Space(); GUI.color = Color.green; EditorGUILayout.BeginVertical("Helpbox"); EditorGUILayout.LabelField("Unscaled Time can be used.", labelStyle); if(serializedObject.FindProperty("dontDestroyOnLoad").boolValue) { EditorGUILayout.LabelField("This gameobject will not be destroyed when the scene changes.", labelStyle); } EditorGUILayout.EndVertical(); GUI.color = Color.white; } } } #endif