Inheritance: ScriptableObject
Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 void UnloadIfPresent(StringSO value) { UnloadIfPresent(value.value); }
Exemplo n.º 3
0
 void LoadIfNotPresent(StringSO value) { LoadIfNotPresent(value.value); }
Exemplo n.º 4
0
 public void SetPanelMode(StringSO mode)
 {
     curPanelMode = mode;
 }
Exemplo n.º 5
0
 private void Awake()
 {
     _commandPathSO = Resources.Load <StringSO>("CommandPathSO");
 }