28 lines
547 BLFS
C#
28 lines
547 BLFS
C#
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
[CustomEditor(typeof(Clickable))]
|
|
[CanEditMultipleObjects]
|
|
public class ClickableEditor : Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
// Draw the default inspector first
|
|
DrawDefaultInspector();
|
|
|
|
// Add a space in the inspector
|
|
EditorGUILayout.Space();
|
|
|
|
if (target != null)
|
|
{
|
|
Clickable Clickable = (Clickable)target;
|
|
// Add a button that sets the videoClip to null
|
|
if (GUILayout.Button("Debug print"))
|
|
{
|
|
Clickable.Print();
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|