public override void OnInspectorGUI() { EditorGUILayout.HelpBox("This script contains all persistant shop information", MessageType.Info); ShopController script = (ShopController)target; if (GUILayout.Button("AssignDefaultValues")) { if (script != null) { script.AssignDefaults(); } } base.OnInspectorGUI(); }