public override void OnInspectorGUI()
    {
        if (GUILayout.Button("Update"))
        {
            if (!Load())
            {
                const string error1 = "\n- Check the path of the 'Sheet Name' and the file is exist at the path.";
                const string error2 = "\n- Also check the excel file has the sheet which matches with 'Worksheet Name'.";
                EditorUtility.DisplayDialog(
                    "Error",
                    "Failed to import and update the excel file." + error1 + error2,
                    "OK"
                    );
            }
        }

        if (target == null)
        {
            return;
        }

        //this.DrawDefaultInspector();
        ExposeProperties.Expose(databaseFields);

        foreach (PropertyField[] p in pInfoList)
        {
            ExposeProperties.Expose(p);
        }
    }
    public override void OnInspectorGUI()
    {
        if (target == null)
        {
            return;
        }

        var node            = target as DoublyLinkedListNode;
        var recordedObjects = new List <UnityEngine.Object> ()
        {
            node
        };

        if (node.Prev != null)
        {
            recordedObjects.Add(node.Prev);
        }

        if (node.Next != null)
        {
            recordedObjects.Add(node.Next);
        }

        Undo.RecordObjects(recordedObjects.ToArray(), node.name + " property change");

        this.DrawDefaultInspector();
        ExposeProperties.Expose(propertyFields, recordUndo: false);
    }
Esempio n. 3
0
    public override void OnInspectorGUI()
    {
        if (target == null)
        {
            return;
        }

        if (GUILayout.Button("Download"))
        {
            if (!Load())
            {
                Debug.LogError("Failed to Load data from Google.");
            }
        }

        EditorGUILayout.Separator();

        //this.DrawDefaultInspector();
        ExposeProperties.Expose(databaseFields);

        foreach (PropertyField[] p in pInfoList)
        {
            ExposeProperties.Expose(p);
        }
    }
Esempio n. 4
0
 public override void OnInspectorGUI()
 {
     if (instance == null)
         return;
     DrawDefaultInspector();
     ExposeProperties.Expose(instance_Fields);
 }
Esempio n. 5
0
        public override void OnInspectorGUI()
        {
            if (instance == null)
            {
                return;
            }
            DrawDefaultInspector();
            switch (instance.Projection)
            {
            case Isometric.Projection.Isometric:
            case Isometric.Projection.Dimetric1To2:
            case Isometric.Projection.Military:
            case Isometric.Projection.Dimetric42To7:
                break;

            case Isometric.Projection.DimetricCustom:
                instance.XRot = EditorGUILayout.FloatField("XRotation", instance.XRot);
                break;

            case Isometric.Projection.OrthographicCustom:
                instance.XRot = EditorGUILayout.FloatField("XRotation", instance.XRot);
                instance.YRot = EditorGUILayout.FloatField("YRotation", instance.YRot);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
            ExposeProperties.Expose(instance_Fields);
        }
Esempio n. 6
0
        public override void OnInspectorGUI()
        {
            if (target == null)
            {
                return;
            }

            if (!isInitialized)
            {
                isInitialized = true;
                InitGUISkin();
            }

            if (GUILayout.Button("Download"))
            {
                if (!Load())
                {
                    Debug.LogError("Failed to Load data from Google.");
                }
            }

            EditorGUILayout.Separator();

            //this.DrawDefaultInspector();
            ExposeProperties.Expose(databaseFields);

            foreach (PropertyField[] p in pInfoList)
            {
                GUILayout.BeginVertical(brown);
                ExposeProperties.Expose(p);
                GUILayout.EndVertical();
            }
        }
Esempio n. 7
0
    public override void OnInspectorGUI()
    {
        if (m_Instance == null)
        {
            return;
        }

        this.DrawDefaultInspector();

        // Expose the decorated fields
        ExposeProperties.Expose(m_fields);

        GUILayoutOption[] emptyOptions = new GUILayoutOption[0];

        if (m_Instance.node == null || !m_Instance.node.IsValid())
        {
            EditorGUILayout.LabelField("No created native Node Handle", emptyOptions);

            m_defaultClass = EditorGUILayout.TextField("Class Name", m_defaultClass, emptyOptions);

            EditorGUILayout.BeginHorizontal(emptyOptions);

            if (GUILayout.Button("Create " + m_defaultClass))
            {
            }

            GUILayout.FlexibleSpace();

            EditorGUILayout.EndHorizontal();

            return;
        }

        bool change = false;

        if (PropEdit_Node(m_Instance.node as Node))
        {
            change = true;
        }

        if (change)
        {
            m_Instance.node.SetDirtySaveData(true);
        }

        if (m_Instance.node.HasDirtySaveData())
        {
            EditorGUILayout.BeginHorizontal(emptyOptions);

            if (GUILayout.Button("Save"))
            {
                m_Instance.node.SaveDirtyData();
            }

            GUILayout.FlexibleSpace();

            EditorGUILayout.EndHorizontal();
        }
    }
Esempio n. 8
0
 public override void OnInspectorGUI()
 {
     if (m_Instance == null)
     {
         return;
     }
     this.DrawDefaultInspector();
     ExposeProperties.Expose(m_fields);
 }
Esempio n. 9
0
        public void OnEnable()
        {
            _target = target as Variable <T>;
            _fields = ExposeProperties.GetProperties(_target);

            _disposable = _target.AsObservable().Subscribe(value => {
                Repaint();
            });
        }
Esempio n. 10
0
    public override void OnInspectorGUI()
    {
        if (target == null)
        {
            return;
        }

        this.DrawDefaultInspector();
        ExposeProperties.Expose(propertyFields, recordUndo: true);
    }
Esempio n. 11
0
 public override void OnInspectorGUI()
 {
     if (_instance == null)
     {
         return;
     }
     DrawDefaultInspector();
     UpdateHandlePos();
     ExposeProperties.Expose(_instanceFields);
 }
Esempio n. 12
0
        public override void OnInspectorGUI()
        {
            EditorGUI.BeginChangeCheck();
            ExposeProperties.Expose(_properties);

            if (EditorGUI.EndChangeCheck())
            {
                EditorUtility.SetDirty(_instance);
            }
        }
Esempio n. 13
0
        /// <summary>
        /// Raises the inspector GU event.
        /// </summary>
        public override void OnInspectorGUI()
        {
            if (trackableObjectComponent == null)
            {
                return;
            }

            this.DrawDefaultInspector();

            ExposeProperties.Expose(propertyField_array);
        }
Esempio n. 14
0
 private void OnEnable()
 {
     UpdateHandlePos();
     _instance          = target as IsoTransform;
     _instance.Position = _instance.Position;
     _instanceFields    = ExposeProperties.GetProperties(_instance);
     if (_instance == null)
     {
         return;
     }
     _instance.GetComponent <Transform>().hideFlags = HideFlags.HideInInspector;           //hides Transform component
     UnityEditorInternal.ComponentUtility.MoveComponentUp(_instance);
 }
Esempio n. 15
0
    void OnEnable()
    {
        // to resolve TlsException error
        ServicePointManager.ServerCertificateValidationCallback = Validator;

        scriptMachine = target as GoogleMachine;
        if (scriptMachine != null)
        {
            scriptMachine.ReInitialize();

            databaseFields = ExposeProperties.GetProperties(scriptMachine);
        }
    }
Esempio n. 16
0
        public void OnEnable()
        {
            _target = target as Variable <T>;
            _fields = ExposeProperties.GetProperties(_target);

#if REACTIVE_VARIABLE_RX_ENABLED
            _disposable = _target.AsObservable().Subscribe(value => {
                Repaint();
            });
#else
            _target.OnValueChanged += HandleValueChanged;
#endif
        }
Esempio n. 17
0
    public override void OnEnable()
    {
        base.OnEnable();

        SpawnList data = target as SpawnList;

        databaseFields = ExposeProperties.GetProperties(data);

        foreach (SpawnListData e in data.dataArray)
        {
            dataFields = ExposeProperties.GetProperties(e);
            pInfoList.Add(dataFields);
        }
    }
Esempio n. 18
0
    public override void OnEnable()
    {
        base.OnEnable();

        language data = target as language;

        databaseFields = ExposeProperties.GetProperties(data);

        foreach (languageData e in data.dataArray)
        {
            dataFields = ExposeProperties.GetProperties(e);
            pInfoList.Add(dataFields);
        }
    }
Esempio n. 19
0
    public override void OnEnable()
    {
        base.OnEnable();

        MySpreadSheet data = target as MySpreadSheet;

        databaseFields = ExposeProperties.GetProperties(data);

        foreach (MyData e in data.dataArray)
        {
            dataFields = ExposeProperties.GetProperties(e);
            pInfoList.Add(dataFields);
        }
    }
Esempio n. 20
0
    public override void OnInspectorGUI()
    {
        if (m_Instance == null)
        {
            return;
        }

        this.DrawDefaultInspector();

        ExposeProperties.Expose(m_fields);

        if (GUI.changed)
        {
            EditorUtility.SetDirty(target);
        }
    }
Esempio n. 21
0
    public override void OnInspectorGUI()
    {
        ShowAuthenticastion();

        if (target == null)
        {
            return;
        }

        //this.DrawDefaultInspector();
        ExposeProperties.Expose(databaseFields);

        foreach (PropertyField[] p in pInfoList)
        {
            ExposeProperties.Expose(p);
        }
    }
        public override void OnInspectorGUI()
        {
            if (_target == null)
            {
                return;
            }

            DrawDefaultInspector();
            ExposeProperties.Expose(_fields);

            if (_target != null && _target.CurrentValue != null && _target.DefaultValue != null && !_target.CurrentValue.Equals(_target.DefaultValue))
            {
                if (GUILayout.Button("Current -> Default"))
                {
                    _target.DefaultValue = _target.CurrentValue;
                }
            }
        }
Esempio n. 23
0
        public override void OnInspectorGUI()
        {
            if (_target == null)
            {
                return;
            }

            // Draw script
            serializedObject.Update();
            SerializedProperty prop = serializedObject.FindProperty("m_Script");

            EditorGUILayout.PropertyField(prop, true);

            EditorGUILayout.PropertyField(serializedObject.FindProperty("_persistenceKey"), true);

            if (_target.SupportsRemoteSettings())
            {
                EditorGUILayout.PropertyField(serializedObject.FindProperty("RemoteSettingsVariable"), true);
            }
            else
            {
                _target.RemoteSettingsVariable = false;
            }

            if (_target.RemoteSettingsVariable)
            {
                EditorGUILayout.PropertyField(serializedObject.FindProperty("RemoteSettingsId"), true);
            }

            EditorGUILayout.PropertyField(serializedObject.FindProperty("DeveloperDescription"), true);
            EditorGUILayout.PropertyField(serializedObject.FindProperty("DefaultValue"), true);
            ExposeProperties.Expose(_fields); // Current value

            if (_target != null && _target.CurrentValue != null && _target.DefaultValue != null && !_target.CurrentValue.Equals(_target.DefaultValue))
            {
                if (GUILayout.Button("Current -> Default"))
                {
                    _target.DefaultValue = _target.CurrentValue;
                }
            }

            serializedObject.ApplyModifiedProperties();
        }
Esempio n. 24
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        //DrawDefaultInspector();
        if (GUI.changed)
        {
            pInfoList.Clear();

            SpawnList data = target as SpawnList;
            foreach (SpawnListData e in data.dataArray)
            {
                dataFields = ExposeProperties.GetProperties(e);
                pInfoList.Add(dataFields);
            }

            EditorUtility.SetDirty(target);
            Repaint();
        }
    }
Esempio n. 25
0
        /// <summary>
        ///   Called when the inspector GUI should be drawn.
        /// </summary>
        public override void OnInspectorGUI()
        {
            if (this.instance == null)
            {
                return;
            }

            // Draw default inspector.
            this.DrawDefaultInspector();

            // Draw properties.
            ExposeProperties.Expose(this.propertyFields);

            // Draw input information.
            EditorGUILayout.Vector2Field("Screen Dimensions", new Vector2(Screen.width, Screen.height));
            EditorGUILayout.Vector3Field("Mouse Position", Input.mousePosition);
            EditorGUILayout.Vector3Field("GUI Mouse Position", InputUtils.GUIMousePosition);

            // Always update.
            EditorUtility.SetDirty(this.instance);
        }
Esempio n. 26
0
    void OnEnable()
    {
        // to resolve TlsException error
        ServicePointManager.ServerCertificateValidationCallback = Validator;

        machine = target as GoogleMachine;
        if (machine != null)
        {
            machine.ReInitialize();

            databaseFields = ExposeProperties.GetProperties(machine);

            if (string.IsNullOrEmpty(GoogleDataSettings.Instance.RuntimePath) == false)
            {
                machine.RuntimeClassPath = GoogleDataSettings.Instance.RuntimePath;
            }
            if (string.IsNullOrEmpty(GoogleDataSettings.Instance.EditorPath) == false)
            {
                machine.EditorClassPath = GoogleDataSettings.Instance.EditorPath;
            }
        }
    }
Esempio n. 27
0
        //--------------------------------------
        //  Methods
        //--------------------------------------

        //--------------------------------------
        //  Events
        //--------------------------------------
        /// <summary>
        /// Raises the enable event.
        /// </summary>
        public void OnEnable()
        {
            trackableObjectComponent = target as TrackableObjectComponent;
            propertyField_array      = ExposeProperties.GetProperties(trackableObjectComponent);
        }
Esempio n. 28
0
 public void OnEnable()
 {
     m_Instance = target as GraphRenderer;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
Esempio n. 29
0
 public virtual void OnEnable()
 {
     m_Instance = target as ExposableMonoBehaviour;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }
 public void OnEnable()
 {
     m_Instance = target as VolumetricLineBehavior;
     m_fields   = ExposeProperties.GetProperties(m_Instance);
 }