project ive been working on for a while, just felt confident enough to move it here
36 lines
No EOL
876 B
C#
36 lines
No EOL
876 B
C#
using System;
|
|
using UnityEngine;
|
|
using VRC.SDKBase;
|
|
#if UNITY_EDITOR
|
|
using UnityEditor;
|
|
#endif
|
|
|
|
namespace gay.lilyy.aacshared.runtimecomponents
|
|
{
|
|
public class ChildToggleDefinition : MonoBehaviour, IEditorOnly {
|
|
|
|
// unity needs this to show the enable/disable box
|
|
void Start(){}
|
|
|
|
public string MenuPath = "";
|
|
}
|
|
|
|
#if UNITY_EDITOR
|
|
[CustomEditor(typeof(ChildToggleDefinition))]
|
|
public class ChildToggleDefinitionInspector : Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
EditorGUILayout.HelpBox(
|
|
"Any direct children of this object will have a toggle in the menu",
|
|
MessageType.Info
|
|
);
|
|
|
|
EditorGUILayout.Space();
|
|
|
|
// Draw the default inspector to show the 'enable' field
|
|
DrawDefaultInspector();
|
|
}
|
|
}
|
|
#endif
|
|
} |