protected void DrawExtensionListElement(Rect rect, int index, bool isActive, bool isFocused) { rect = EZEditorGUIUtility.DrawReorderableListIndex(rect, m_ExtensionList, index); rect.height = EditorGUIUtility.singleLineHeight; SerializedProperty extension = extensionList.serializedProperty.GetArrayElementAtIndex(index); EditorGUI.PropertyField(rect, extension, GUIContent.none); }
protected virtual void DrawPrefabListElement(Rect rect, int index, bool isActive, bool isFocused) { rect.y += 1; rect = EZEditorGUIUtility.DrawReorderableListIndex(rect, m_Options, index); SerializedProperty prefab = optionList.serializedProperty.GetArrayElementAtIndex(index); rect.height = EditorGUIUtility.singleLineHeight; EditorGUI.PropertyField(rect, prefab, GUIContent.none); }
private void DrawAlwaysIncludedShaderListElement(Rect rect, int index, bool isActive, bool isFocused) { SerializedProperty shaderProperty = m_AlwaysIncludedShaders.GetArrayElementAtIndex(index); rect = EZEditorGUIUtility.DrawReorderableListIndex(rect, m_AlwaysIncludedShaders, index); rect.y += 1; rect.height = EditorGUIUtility.singleLineHeight; EditorGUI.PropertyField(rect, shaderProperty, GUIContent.none); }
protected void DrawPatternListElement(Rect rect, int index, bool isActive, bool isFocused) { rect = EZEditorGUIUtility.DrawReorderableListIndex(rect, m_PatternList, index); SerializedProperty pattern = patternList.serializedProperty.GetArrayElementAtIndex(index); float width = rect.width / 2; float margin = 5; EditorGUI.PropertyField(new Rect(rect.x, rect.y, width - margin, EditorGUIUtility.singleLineHeight), pattern.FindPropertyRelative("Key"), GUIContent.none); rect.x += width; EditorGUI.PropertyField(new Rect(rect.x, rect.y, width - margin, EditorGUIUtility.singleLineHeight), pattern.FindPropertyRelative("Value"), GUIContent.none); }
public void DrawCopyListElement(Rect rect, int index, bool isActive, bool isFocused) { SerializedProperty m_PathPair = m_CopyList.GetArrayElementAtIndex(index); SerializedProperty m_SrcPath = m_PathPair.FindPropertyRelative("m_SrcPath"); SerializedProperty m_DstPath = m_PathPair.FindPropertyRelative("m_DstPath"); rect = EZEditorGUIUtility.DrawReorderableListIndex(rect, m_CopyList, index); rect.y += 1; rect.height = EditorGUIUtility.singleLineHeight; float width = rect.width / 2; float margin = 5; rect.width = width - margin; EditorGUI.PropertyField(rect, m_SrcPath, GUIContent.none); rect.x += width; EditorGUI.PropertyField(rect, m_DstPath, GUIContent.none); }
private void DrawCopyListElement(Rect rect, int index, bool isActive, bool isFocused) { rect.y += 1; rect = EZEditorGUIUtility.DrawReorderableListIndex(rect, m_CopyList, index); SerializedProperty m_CopyInfo = m_CopyList.GetArrayElementAtIndex(index); SerializedProperty m_DestDirPath = m_CopyInfo.FindPropertyRelative("destDirPath"); SerializedProperty m_SrcDirPath = m_CopyInfo.FindPropertyRelative("sourDirPath"); float width = rect.width / 2; EditorGUI.PropertyField(new Rect(rect.x, rect.y, width - space, lineHeight), m_DestDirPath, GUIContent.none); rect.x += width; EditorGUI.PropertyField(new Rect(rect.x, rect.y, width - space, lineHeight), m_SrcDirPath, GUIContent.none); }
protected void DrawElementListElement(Rect rect, int index, bool isActive, bool isFocused) { rect.y += 1; rect = EZEditorGUIUtility.DrawReorderableListIndex(rect, m_Elements, index); SerializedProperty element = m_Elements.GetArrayElementAtIndex(index); if (m_IsList.boolValue) { float width = rect.width / 2, space = 5; rect.width = width - space; rect.height = EditorGUIUtility.singleLineHeight; EZPropertyDrawer.DrawTypeOption(rect, element); rect.x += width; EZPropertyDrawer.DrawValueContent(rect, element); } else { EditorGUI.PropertyField(rect, element); } }
private void DrawBundleListElement(Rect rect, int index, bool isActive, bool isFocused) { rect.y += 1; rect = EZEditorGUIUtility.DrawReorderableListIndex(rect, m_BundleList, index); SerializedProperty m_BundleInfo = m_BundleList.GetArrayElementAtIndex(index); SerializedProperty m_BundleName = m_BundleInfo.FindPropertyRelative("bundleName"); SerializedProperty m_FilePattern = m_BundleInfo.FindPropertyRelative("filePattern"); SerializedProperty m_SearchOption = m_BundleInfo.FindPropertyRelative("searchOption"); SerializedProperty m_SrcDirPath = m_BundleInfo.FindPropertyRelative("dirPath"); float width = Mathf.Min(100, rect.width / 4); float residue = (rect.width - width * 4) / 10; EditorGUI.PropertyField(new Rect(rect.x, rect.y, width + residue - space, lineHeight), m_BundleName, GUIContent.none); rect.x += width + residue; EditorGUI.PropertyField(new Rect(rect.x, rect.y, width + residue - space, lineHeight), m_FilePattern, GUIContent.none); rect.x += width + residue; EditorGUI.PropertyField(new Rect(rect.x, rect.y, width + residue - space, lineHeight), m_SearchOption, GUIContent.none); rect.x += width + residue; EditorGUI.PropertyField(new Rect(rect.x, rect.y, width + residue * 7 - space, lineHeight), m_SrcDirPath, GUIContent.none); }
private void DrawObjectListElement(Rect rect, int index, bool isActive, bool isFocused) { rect = EZEditorGUIUtility.DrawReorderableListIndex(rect, m_ObjectList, index); rect.height = EditorGUIUtility.singleLineHeight; EditorGUI.PropertyField(rect, m_ObjectList.GetArrayElementAtIndex(index), GUIContent.none); }