public override void OnInspectorGUI() { RealObject obj = target as RealObject; base.OnInspectorGUI(); if (GUILayout.Button("Create Ghost Object")) { obj.CreateGhost(); } }