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); }
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); } }
public override void OnInspectorGUI() { if (instance == null) return; DrawDefaultInspector(); ExposeProperties.Expose(instance_Fields); }
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); }
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(); } }
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(); } }
public override void OnInspectorGUI() { if (m_Instance == null) { return; } this.DrawDefaultInspector(); ExposeProperties.Expose(m_fields); }
public void OnEnable() { _target = target as Variable <T>; _fields = ExposeProperties.GetProperties(_target); _disposable = _target.AsObservable().Subscribe(value => { Repaint(); }); }
public override void OnInspectorGUI() { if (target == null) { return; } this.DrawDefaultInspector(); ExposeProperties.Expose(propertyFields, recordUndo: true); }
public override void OnInspectorGUI() { if (_instance == null) { return; } DrawDefaultInspector(); UpdateHandlePos(); ExposeProperties.Expose(_instanceFields); }
public override void OnInspectorGUI() { EditorGUI.BeginChangeCheck(); ExposeProperties.Expose(_properties); if (EditorGUI.EndChangeCheck()) { EditorUtility.SetDirty(_instance); } }
/// <summary> /// Raises the inspector GU event. /// </summary> public override void OnInspectorGUI() { if (trackableObjectComponent == null) { return; } this.DrawDefaultInspector(); ExposeProperties.Expose(propertyField_array); }
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); }
void OnEnable() { // to resolve TlsException error ServicePointManager.ServerCertificateValidationCallback = Validator; scriptMachine = target as GoogleMachine; if (scriptMachine != null) { scriptMachine.ReInitialize(); databaseFields = ExposeProperties.GetProperties(scriptMachine); } }
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 }
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); } }
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); } }
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); } }
public override void OnInspectorGUI() { if (m_Instance == null) { return; } this.DrawDefaultInspector(); ExposeProperties.Expose(m_fields); if (GUI.changed) { EditorUtility.SetDirty(target); } }
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; } } }
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(); }
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(); } }
/// <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); }
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; } } }
//-------------------------------------- // Methods //-------------------------------------- //-------------------------------------- // Events //-------------------------------------- /// <summary> /// Raises the enable event. /// </summary> public void OnEnable() { trackableObjectComponent = target as TrackableObjectComponent; propertyField_array = ExposeProperties.GetProperties(trackableObjectComponent); }
public void OnEnable() { m_Instance = target as GraphRenderer; m_fields = ExposeProperties.GetProperties(m_Instance); }
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); }