using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; [CustomEditor(typeof(BlackHoleRenderer))] public class BlackHoleRendererEditor : Editor { public override void OnInspectorGUI() { base.OnInspectorGUI(); if (GUILayout.Button("Recalc")) { (target as BlackHoleRenderer).RecalcState(); } if (GUILayout.Button("Trace")) { (target as BlackHoleRenderer).Trace(); } } }