Beispiel #1
0
    private void AddFunctionFunctionality()
    {
        GUILayout.BeginHorizontal();
        {
            GUILayout.Space(_defaultSpacing);
            if (GUILayout.Button("Add function", GUILayout.Width(150)))
            {
                if (_functionConfig == null)
                {
                    _self.AddFunction();
                }
                else
                {
                    _self.AddFunction(_functionConfig);
                    _functionConfig = null;
                }

                _showFunctions = true;

                if (FunctionAdded != null)
                {
                    FunctionAdded();
                }
            }
            _functionConfig = (FunctionConfig)EditorGUILayout.ObjectField(_functionConfig, typeof(FunctionConfig), true);
            GUILayout.Space(_defaultSpacing);
        }
        GUILayout.EndHorizontal();
    }