private void OnGUI() { EditorGUILayout.LabelField("Create Your Command", EditorStyles.boldLabel); _commandName = EditorGUILayout.TextField("Command Name", _commandName); // Create New Command Button EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel(" "); if (GUILayout.Button("Create New Command") && _commandPathSO) { CreateCommand(_commandName, _commandPathSO.value); } EditorGUILayout.EndHorizontal(); // Create ScriptableObject from Command Button EditorGUILayout.BeginHorizontal(); EditorGUILayout.PrefixLabel(" "); if (GUILayout.Button("Create ScriptableObject from Command") && _commandPathSO) { CreateCommandSO(_commandName, _commandPathSO.value); } EditorGUILayout.EndHorizontal(); // References EditorGUILayout.Space(); EditorGUILayout.LabelField("References", EditorStyles.boldLabel); _commandPathSO = EditorGUILayout.ObjectField("Command Path", _commandPathSO, typeof(StringSO), true) as StringSO; }
void UnloadIfPresent(StringSO value) { UnloadIfPresent(value.value); }
void LoadIfNotPresent(StringSO value) { LoadIfNotPresent(value.value); }
public void SetPanelMode(StringSO mode) { curPanelMode = mode; }
private void Awake() { _commandPathSO = Resources.Load <StringSO>("CommandPathSO"); }