private void DrawInspector() { EditorGUILayout.PropertyField(this.m_UseButton); EditorGUILayout.PropertyField(this.m_DynamicContainer); this.m_ShowDynamicContainer.target = this.m_DynamicContainer.boolValue; if (EditorGUILayout.BeginFadeGroup(this.m_ShowDynamicContainer.faded)) { EditorGUI.indentLevel = EditorGUI.indentLevel + 1; EditorGUILayout.PropertyField(this.m_SlotParent); EditorGUILayout.PropertyField(this.m_SlotPrefab); EditorGUI.indentLevel = EditorGUI.indentLevel - 1; } EditorGUILayout.EndFadeGroup(); DrawTypePropertiesExcluding(typeof(ItemContainer), this.m_PropertiesToExcludeForDefaultInspector); EditorGUILayout.PropertyField(this.m_MoveUsedItems); this.m_ShowMoveUsedItems.target = this.m_MoveUsedItems.boolValue; if (EditorGUILayout.BeginFadeGroup(this.m_ShowMoveUsedItems.faded)) { GUILayout.BeginHorizontal(); GUILayout.Space(16f); GUILayout.BeginVertical(); this.m_MoveItemConditionList.DoLayoutList(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); } EditorGUILayout.EndFadeGroup(); if (EditorTools.RightArrowButton(new GUIContent("Restrictions", "Container Restrictions"))) { AssetWindow.ShowWindow("Container Restrictions", this.m_Restrictions); } }
private void DrawInspector() { EditorGUILayout.PropertyField(this.m_UseButton); EditorGUILayout.PropertyField(this.m_DynamicContainer); this.m_ShowDynamicContainer.target = this.m_DynamicContainer.boolValue; if (EditorGUILayout.BeginFadeGroup(this.m_ShowDynamicContainer.faded)) { EditorGUI.indentLevel = EditorGUI.indentLevel + 1; EditorGUILayout.PropertyField(this.m_SlotParent); EditorGUILayout.PropertyField(this.m_SlotPrefab); EditorGUI.indentLevel = EditorGUI.indentLevel - 1; } EditorGUILayout.EndFadeGroup(); ItemCollection collection = (target as ItemContainer).GetComponent <ItemCollection>(); EditorGUI.BeginDisabledGroup(collection != null); if (collection != null) { EditorGUILayout.HelpBox("You can't use references with an ItemCollection component.", MessageType.Warning); this.m_UseReferences.boolValue = false; } EditorGUILayout.PropertyField(this.m_UseReferences); EditorGUI.EndDisabledGroup(); DrawTypePropertiesExcluding(typeof(ItemContainer), this.m_PropertiesToExcludeForDefaultInspector); EditorGUILayout.PropertyField(this.m_MoveUsedItems); this.m_ShowMoveUsedItems.target = this.m_MoveUsedItems.boolValue; if (EditorGUILayout.BeginFadeGroup(this.m_ShowMoveUsedItems.faded)) { GUILayout.BeginHorizontal(); GUILayout.Space(16f); GUILayout.BeginVertical(); this.m_MoveItemConditionList.DoLayoutList(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); } EditorGUILayout.EndFadeGroup(); if (EditorTools.RightArrowButton(new GUIContent("Restrictions", "Container Restrictions"))) { AssetWindow.ShowWindow("Container Restrictions", this.m_Restrictions); } }
public override void OnInspectorGUI() { ScriptGUI(); serializedObject.Update(); for (int i = 0; i < m_DrawInspectors.Count; i++) { this.m_DrawInspectors[i].Invoke(); } DrawPropertiesExcluding(serializedObject, this.m_PropertiesToExcludeForChildClasses); if (EditorTools.RightArrowButton(new GUIContent("Restrictions", "Slot restrictions"))) { AssetWindow.ShowWindow("Slot Restrictions", serializedObject.FindProperty("restrictions")); } TriggerGUI(); serializedObject.ApplyModifiedProperties(); if (EditorWindow.mouseOverWindow != null) { EditorWindow.mouseOverWindow.Repaint(); } }