예제 #1
0
        public void DrawInspectorGUI(ScriptableObject settings, ServiceItem item, System.Action onReset, GUISkin skin)
        {
            if (FlowSystem.GetData() == null)
            {
                GUILayout.Label("No Data");
                return;
            }

            ++UnityEditor.EditorGUI.indentLevel;
            try {
                if (this.GetAuthPermissions() != AuthKeyPermissions.None && FlowSystem.GetData().IsValidAuthKey() == false)
                {
                    UnityEditor.EditorGUILayout.HelpBox("Authorization Key is not valid.", UnityEditor.MessageType.Error);
                    FlowSystem.DrawEditorGetKeyButton(skin);
                }
                else if (FlowSystem.GetData().IsValidAuthKey(this.GetAuthPermissions()) == false)
                {
                    UnityEditor.EditorGUILayout.HelpBox("You have no permission to use this service.", UnityEditor.MessageType.Warning);
                    FlowSystem.DrawEditorGetKeyButton(skin);
                }
                else
                {
                    this.DoInspectorGUI(settings, item, onReset, skin);
                }
            } catch (UnityException e) {
                Debug.LogException(e);
            }
            --UnityEditor.EditorGUI.indentLevel;
        }