Пример #1
0
        private void OnGUI()
        {
            TypeSelection();

            EditorGUILayout.Space();

            DataFields();

            if (string.IsNullOrEmpty(_typeName) || string.IsNullOrEmpty(_namespace))
            {
                GUI.enabled = false;
            }

            if (GUILayout.Button("Generate"))
            {
                SO_CodeGenerator.Data data = new SO_CodeGenerator.Data()
                {
                    Types     = _states,
                    TypeName  = _typeName,
                    MenuName  = RequiresMenu() ? _menuName : default(string),
                    Namespace = _namespace,
                    Order     = _order,
                };

                SO_CodeGenerator.Generate(data);
                AssetDatabase.Refresh();
            }
        }
Пример #2
0
        private void OnGUI()
        {
            TypeSelection();

            EditorGUILayout.Space();

            DataFields();

            if (GUILayout.Button("Generate"))
            {
                SO_CodeGenerator.Data data = new SO_CodeGenerator.Data()
                {
                    Types    = _states,
                    TypeName = _typeName,
                    MenuName = RequiresMenu() ? _menuName : default(string),
                    Order    = _order,
                };

                SO_CodeGenerator.Generate(data);
            }
        }