Пример #1
0
        private void DrawEventArgumentMonoFields()
        {
            eventArgScript = this.DrawEventArgumentMonoField(eventArgScript);

            // Script is set to none, cannot proceed as we can't get Name or Namespace of the args
            // script.
            if (eventArgScript == null)
            {
                return;
            }

            // At the moment, args script type name must match the file name, otherwise Unity can't
            // find the type info inside the file.
            var eventArgScriptType = eventArgScript.GetClass();

            if (eventArgScriptType == null)
            {
                ScriptCreatorEditorWindowGUI.DrawEventArgumentHelpBox(eventArgScript);
                return;
            }

            var oldEventArgName = eventArgName;
            var newEventArgName = eventArgScriptType.Name;

            if (oldEventArgName == newEventArgName)
            {
                return;
            }

            SetupFields(oldEventArgName, newEventArgName);

            eventArgName      = newEventArgName;
            eventArgNamespace = eventArgScriptType.Namespace;
        }
Пример #2
0
        private void DrawWindowHeader()
        {
            var state             = ScriptableEventEditorState.ScriptCreatorState;
            var isBuiltInDefaults = state.IsBuiltInDefaults;

            optionsButtonPosition = ScriptCreatorEditorWindowGUI.DrawWindowHeader(
                optionsButtonPosition,
                isBuiltInDefaults,
                ApplyDefaults,
                RevertDefaults,
                OverrideDefaults
                );
        }
Пример #3
0
        private void DrawEventArgumentGroup()
        {
            ScriptCreatorEditorWindowGUI.DrawEventArgumentHeader();
            isUseMonoScript = this.DrawMonoScriptToggle(isUseMonoScript);

            if (isUseMonoScript)
            {
                DrawEventArgumentMonoFields();
            }
            else
            {
                DrawEventArgumentFields();
            }
        }
Пример #4
0
 private void DrawEventGroup()
 {
     ScriptCreatorEditorWindowGUI.DrawEventHeader();
     DrawEventFields();
 }
Пример #5
0
        private void DrawCreateButton()
        {
            var isFieldsSet = IsRequiredFieldsSet();

            ScriptCreatorEditorWindowGUI.DrawCreateEventButton(isFieldsSet, CreateScripts);
        }