private void DrawParts(Rect rect) { GUILayout.BeginArea(rect); { EditorGUILayout.BeginVertical(); { EGUILayout.DrawBoxHeader("Part Data", EGUIStyles.BoxedHeaderCenterStyle, GUILayout.ExpandWidth(true)); if (currentCreatorData != null && partOutputDataDrawer != null) { partOutputDataDrawer.OnGUILayout(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Create Parts")) { AvatarSkeletonPartCreatorData partOutputData = currentCreatorData.skeletonPartData; foreach (var data in partOutputData.partDatas) { if (!CreatePart(data)) { break; } } } } } EditorGUILayout.EndVertical(); } GUILayout.EndArea(); }
public override void OnInspectorGUI() { EGUILayout.DrawScript(target); EditorGUILayout.Space(); EGUI.BeginGUIColor(Color.grey); { EditorGUILayout.BeginVertical(EditorStyles.helpBox); { EGUILayout.DrawBoxHeader("Native Drawer Setting", GUILayout.ExpandWidth(true)); EGUI.BeginIndent(); { NativeDrawerSetting.IsShowHelp = EditorGUILayout.Toggle("Is Show Help", NativeDrawerSetting.IsShowHelp); } EGUI.EndIndent(); } EditorGUILayout.EndVertical(); } EGUI.EndGUIColor(); EditorGUILayout.Space(); EGUI.BeginLabelWidth(GetLabelWidth()); { drawerObject.OnGUILayout(); } EGUI.EndLableWidth(); }
private void DrawToolbar(Rect rect) { GUILayout.BeginArea(rect); { GUILayout.BeginHorizontal(); { if (EGUILayout.ToolbarButton("New")) { var newData = EGUIUtility.CreateAsset <AvatarCreatorData>(); if (newData != null) { string assetPath = AssetDatabase.GetAssetPath(newData); dataListView.AddItem(assetPath); dataListView.SetSelection(dataListView.GetCount() - 1); } } if (EGUILayout.ToolbarButton("Delete")) { if (currentCreatorData != null) { string assetPath = AssetDatabase.GetAssetPath(currentCreatorData); dataListView.RemoveItem(assetPath); DeleteCreatorData(currentCreatorData); dataListView.SetSelection(-1); } } } GUILayout.EndHorizontal(); } GUILayout.EndArea(); }
public void OnGUILayout() { if (IsShowScroll) { scrollPos = EditorGUILayout.BeginScrollView(scrollPos, GUILayout.ExpandHeight(false)); } EditorGUILayout.BeginVertical(); { foreach (var typeDrawProperty in typeDrawerProperties) { EGUILayout.DrawHorizontalSpace(10); EGUILayout.DrawBoxHeader(typeDrawProperty.type.Name, GUILayout.ExpandWidth(true)); EGUILayout.DrawHorizontalLine(); foreach (var property in typeDrawProperty.drawerProperties) { property.OnGUILayout(); } } } EditorGUILayout.EndVertical(); if (IsShowScroll) { EditorGUILayout.EndScrollView(); } if (drawerObject != null && typeof(UnityEngine.Object).IsAssignableFrom(drawerObject.GetType())) { if (GUI.changed) { EditorUtility.SetDirty((UnityEngine.Object)drawerObject); } } }
public override void OnInspectorGUI() { EGUILayout.DrawScript(target); EditorGUILayout.Space(); //if(searchField == null) //{ // searchField = new SearchField(); //} //Rect searchRect = GUILayoutUtility.GetRect(GUIContent.none, GUIStyle.none, GUILayout.ExpandWidth(true), GUILayout.Height(40)); //string text = searchField.OnGUI(searchRect,searchText); //if(text!= searchText) //{ // searchText = text; // searchResults.Clear(); // if(!string.IsNullOrEmpty(searchText)) // { // for(int i =0;i<assetDatasProperty.arraySize;++i) // { // SerializedProperty dataProperty = assetDatasProperty.GetArrayElementAtIndex(i); // string assetPath = dataProperty.FindPropertyRelative("assetPath").stringValue; // if(assetPath.ToLower().IndexOf(searchText.ToLower()) >= 0) // { // searchResults.Add(dataProperty.Copy()); // } // } // } //} //foreach(var data in searchResults) //{ // EditorGUILayout.PropertyField(data,true); //} }
private void DrawData(IniGroup group, IniData data) { string value = data.Value; EditorGUILayout.BeginHorizontal(); { if (data.OptionValues != null && data.OptionValues.Length > 0) { value = EGUILayout.StringPopup(new GUIContent(data.Key, data.Comment), data.Value, data.OptionValues); } else { value = EditorGUILayout.TextField(new GUIContent(data.Key, data.Comment), data.Value); } if (GUILayout.Button(Contents.DeleteContent, GUILayout.Width(20))) { deleteData = new DeleteData() { groupName = group.Name, dataKey = data.Key }; } } EditorGUILayout.EndHorizontal(); if (data.Value != value) { data.Value = value; } }
public override void OnInspectorGUI() { EGUILayout.DrawScript(target); serializedObject.Update(); { scrollPos = EditorGUILayout.BeginScrollView(scrollPos); { EditorGUILayout.PropertyField(postTypeProperty); EditorGUILayout.Space(); EditorGUILayout.PropertyField(filterProperty); if (rulerRList == null) { rulerRList = new ReorderableList(serializedObject, rulerProperty, true, true, true, true); rulerRList.drawElementCallback = (rect, index, isActive, isFocused) => { SerializedProperty property = rulerProperty.GetArrayElementAtIndex(index); EditorGUI.PropertyField(rect, property); }; rulerRList.drawHeaderCallback = (rect) => { EditorGUI.LabelField(rect, "Rulers"); }; rulerRList.onAddCallback = (list) => { genericMenu.ShowAsContext(); }; rulerRList.onRemoveCallback = (list) => { var removedObj = rulerProperty.GetArrayElementAtIndex(list.index).objectReferenceValue; rulerProperty.RemoveElementAt(list.index); if (removedObj != null) { AssetDatabase.RemoveObjectFromAsset(removedObj); AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target)); EditorUtility.SetDirty(target); } }; } EditorGUILayout.Space(); rulerRList.DoLayoutList(); } EditorGUILayout.EndScrollView(); } serializedObject.ApplyModifiedProperties(); EditorGUILayout.Space(); if (GUILayout.Button("Execute", GUILayout.Height(40))) { (target as AssetPostProcess).Process(); } }
protected override void OnDrawProperty(string label) { var attr = GetAttr <StringPopupAttribute>(); string[] options = attr.Options; if (!string.IsNullOrEmpty(attr.MemberName)) { options = NativeDrawerUtility.GetMemberValue <string[]>(attr.MemberName, DrawerProperty.Target); } var value = DrawerProperty.GetValue <string>(); label = label ?? ""; if (attr.IsSearchable) { EditorGUILayout.BeginHorizontal(); { EditorGUILayout.PrefixLabel(label); Rect btnRect = GUILayoutUtility.GetRect(new GUIContent(value), "dropdownbutton"); if (EditorGUI.DropdownButton(btnRect, new GUIContent(value), FocusType.Keyboard)) { try { SearchablePopup.Show(btnRect, new Vector2(200, 400), Array.IndexOf(options, value), options, (selected) => { DrawerProperty.Value = options[selected]; }); } catch (ExitGUIException) { lastSearchableWindow = EditorWindow.focusedWindow; throw; } } } EditorGUILayout.EndHorizontal(); if (lastSearchableWindow && lastSearchableWindow != EditorWindow.mouseOverWindow) { if (Event.current.type == EventType.ScrollWheel) { Event.current.Use(); } } } else { EditorGUI.BeginChangeCheck(); { value = EGUILayout.DrawPopup <string>(label, options, options, value); } if (EditorGUI.EndChangeCheck()) { DrawerProperty.Value = value; } } }
public void OnGUILayout() { string label = string.IsNullOrEmpty(Header) ? "" : Header; GUILayoutOption expandWidthOption = GUILayout.ExpandWidth(IsExpandWidth); GUIStyle style = IsLayoutCenter ? EGUIStyles.BoxedHeaderCenterStyle : EGUIStyles.BoxedHeaderStyle; EGUILayout.DrawBoxHeader(label, style, expandWidthOption); }
public override void OnInspectorGUI() { EGUILayout.DrawScript(target); serializedObject.Update(); { EGUILayout.DrawAssetFolderSelection(targetFolderProperty, true); } serializedObject.ApplyModifiedProperties(); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); serializedObject.Update(); { EditorGUILayout.BeginVertical(EditorStyles.helpBox); { registParamsRLProperty.OnGUILayout(); } EditorGUILayout.EndVertical(); if (deleteIndex >= 0) { registParamGroupsProperty.RemoveElementAt(deleteIndex); RefreshRegistParamGroups(); deleteIndex = -1; } EditorGUILayout.BeginVertical(EditorStyles.helpBox); { EGUILayout.DrawBoxHeader("Regist Param", GUILayout.ExpandWidth(true)); Rect lastRect = GUILayoutUtility.GetLastRect(); Rect addBtnRect = new Rect(lastRect.x + lastRect.width - 60, lastRect.y, 60, lastRect.height); if (GUI.Button(addBtnRect, "Add")) { registParamGroupsProperty.InsertArrayElementAtIndex(registParamGroupsProperty.arraySize); RefreshRegistParamGroups(); } for (int i = 0; i < registParamGroupsProperty.arraySize; ++i) { SerializedProperty lopaProperty = registParamGroupsProperty.GetArrayElementAtIndex(i); EditorGUILayout.BeginHorizontal(); { EditorGUILayout.BeginVertical(); { SerializedProperty nameProperty = lopaProperty.FindPropertyRelative("name"); EditorGUILayout.PropertyField(nameProperty); registParamGroupsRLProperties[i].OnGUILayout(); } EditorGUILayout.EndVertical(); if (GUILayout.Button("Delete", GUILayout.Width(60))) { deleteIndex = i; } } EditorGUILayout.EndHorizontal(); EGUILayout.DrawHorizontalLine(); } } EditorGUILayout.EndVertical(); } serializedObject.ApplyModifiedProperties(); }
public void OnGUILayout() { if (!string.IsNullOrEmpty(HeaderContent)) { EGUILayout.DrawBoxHeader(HeaderContent, EGUIStyles.BoxedHeaderCenterStyle, GUILayout.ExpandWidth(true)); } Rect rect = GUILayoutUtility.GetRect(GUIContent.none, GUIStyle.none, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true)); treeView?.OnGUI(rect); }
public override void OnGUILayout() { BeginGroupAttribute attr = GetAttr <BeginGroupAttribute>(); EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.ExpandWidth(true)); if (!string.IsNullOrEmpty(attr.Label)) { EGUILayout.DrawBoxHeader(attr.Label, GUILayout.ExpandWidth(true)); } }
protected override void OnDrawProperty(string label) { if (list == null) { list = DrawerProperty.GetValue <IList>(); } EditorGUILayout.BeginVertical(EGUIStyles.BoxStyle); { EditorGUILayout.LabelField(GUIContent.none, EditorStyles.toolbar, GUILayout.ExpandWidth(true)); Rect lastRect = GUILayoutUtility.GetLastRect(); EditorGUI.LabelField(lastRect, label, EGUIStyles.BoldLabelStyle); Rect clearBtnRect = new Rect(lastRect.x + lastRect.width - 40, lastRect.y, 40, lastRect.height); if (GUI.Button(clearBtnRect, "C", EditorStyles.toolbarButton)) { DrawerProperty.ClearArrayElement(); InitList(); } for (int i = 0; i < list.Count; ++i) { EditorGUILayout.BeginHorizontal(); { EditorGUILayout.BeginVertical(); { elementProperties[i].OnGUILayout(); } EditorGUILayout.EndVertical(); EditorGUILayout.BeginVertical(GUILayout.Width(20)); { if (GUILayout.Button("-", GUILayout.Width(20))) { DrawerProperty.RemoveArrayElementAtIndex(i); InitList(); } } EditorGUILayout.EndVertical(); } EditorGUILayout.EndHorizontal(); EGUILayout.DrawHorizontalLine(); } Rect addBtnRect = GUILayoutUtility.GetRect(lastRect.width, 20); addBtnRect.x += addBtnRect.width - 40; addBtnRect.width = 40; if (GUI.Button(addBtnRect, "+")) { DrawerProperty.AddArrayElement(); InitList(); } } EditorGUILayout.EndVertical(); }
public override void OnInspectorGUI() { EGUILayout.DrawScript(target); DrawerSetting.OnDrawSetting(); EGUI.BeginLabelWidth(GetLabelWidth()); { drawerObject.OnGUILayout(); } EGUI.EndLableWidth(); }
protected override void OnLayoutDraw() { if (Filters != null && Filters.Length > 0) { Value = EGUILayout.DrawOpenFileWithFilter(Text, Value, Filters, IsAbsolute, IsTextEditable); } else { Value = EGUILayout.DrawOpenFile(Text, Value, Extension, IsAbsolute, IsTextEditable); } }
public override void OnGUILayout() { SpaceAttribute attr = GetAttr <SpaceAttribute>(); if (attr.Direction == SpaceDirection.Horizontal) { EGUILayout.DrawHorizontalSpace(attr.Size); } else { EGUILayout.DrawVerticalSpace(attr.Size); } }
public override void OnInspectorGUI() { EGUILayout.DrawScript(target); serializedObject.Update(); colorFolderRList.DoLayoutList(); platformFolderRList.DoLayoutList(); tagFolderRList.DoLayoutList(); assetFolderRList.DoLayoutList(); serializedObject.ApplyModifiedProperties(); }
private void DrawSkeleton(Rect rect) { GUILayout.BeginArea(rect); { EditorGUILayout.BeginVertical(); { EGUILayout.DrawBoxHeader("Skeleton Data", EGUIStyles.BoxedHeaderCenterStyle, GUILayout.ExpandWidth(true)); if (currentCreatorData != null && skeletonCreatorDataDrawer != null) { skeletonCreatorDataDrawer.OnGUILayout(); AvatarSkeletonCreatorData skeletonCreatorData = currentCreatorData.skeletonData; string targetPrefabPath = skeletonCreatorData.GetSkeletonPrefabPath(); GameObject targetPrefab = null; if (!string.IsNullOrEmpty(targetPrefabPath)) { targetPrefab = AssetDatabase.LoadAssetAtPath <GameObject>(targetPrefabPath); } EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.ObjectField("Output", targetPrefab, typeof(GameObject), false); EditorGUILayout.Space(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Create Skeleton")) { GameObject skeletonPrefab = AvatarCreatorUtil.CreateSkeleton(skeletonCreatorData); if (skeletonPrefab == null) { EditorUtility.DisplayDialog("Error", "Create Failed.\n Please view the details from the console!!!", "OK"); } else { SelectionUtility.PingObject(skeletonPrefab); } } if (GUILayout.Button("Preview Skeleton")) { PreviewSkeleton(); } } } EditorGUILayout.EndVertical(); } GUILayout.EndArea(); }
protected override void OnDrawProperty(string label) { string value = DrawerProperty.GetValue <string>(); var attr = GetAttr <OpenFolderPathAttribute>(); EditorGUI.BeginChangeCheck(); { value = EGUILayout.DrawOpenFolder(label, value, attr.IsAbsolute); } if (EditorGUI.EndChangeCheck()) { DrawerProperty.Value = value; } }
public override void OnGUI(Rect rect) { GUILayout.BeginArea(rect); { EGUILayout.DrawBoxHeader("Setting", EGUIStyles.BoxedHeaderCenterStyle, GUILayout.ExpandWidth(true)); EditorGUILayout.Space(); scrollPos = EditorGUILayout.BeginScrollView(scrollPos); { if (m_Setting != null) { EditorGUI.BeginChangeCheck(); { m_Setting.GlobalSetting.GlobalLogLevel = (LogLevel)EditorGUILayout.EnumPopup("Global Log Level:", m_Setting.GlobalSetting.GlobalLogLevel); } if (EditorGUI.EndChangeCheck()) { LogViewer.Viewer.ChangeGlobalLogLevel(m_Setting.GlobalSetting.GlobalLogLevel); } if (m_Setting.LoggerSettings.Count > 0) { EditorGUILayout.LabelField("Logger Log Level:"); EGUI.BeginIndent(); { foreach (var loggerSetting in m_Setting.LoggerSettings) { EditorGUI.BeginChangeCheck(); { EditorGUILayout.LabelField(loggerSetting.Name); EGUI.BeginIndent(); { loggerSetting.MinLogLevel = (LogLevel)EditorGUILayout.EnumPopup("Min Log Level:", loggerSetting.MinLogLevel); loggerSetting.StackTraceLogLevel = (LogLevel)EditorGUILayout.EnumPopup("StackTrace Log Level:", loggerSetting.StackTraceLogLevel); } EGUI.EndIndent(); } if (EditorGUI.EndChangeCheck()) { LogViewer.Viewer.ChangeLoggerLogLevel(loggerSetting.Name, loggerSetting.MinLogLevel, loggerSetting.StackTraceLogLevel); } } } EGUI.EndIndent(); } } } EditorGUILayout.EndScrollView(); } GUILayout.EndArea(); }
public override void OnInspectorGUI() { EditorGUILayout.BeginVertical(GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true)); { base.OnInspectorGUI(); EditorGUILayout.Space(); EditorGUILayout.Space(); if (GUILayout.Button("Execute", GUILayout.Height(40))) { AssetAddressUtil.UpdateConfigByGroup(target as AssetAddressGroup); EditorUtility.DisplayDialog("Finished", "Finished", "OK"); } if (GUILayout.Button("Filter", GUILayout.Height(40))) { List <string> files = new List <string>(); AssetAddressGroup group = target as AssetAddressGroup; foreach (var filter in group.filters) { files.AddRange(filter.Filter()); } listViewer = new EGUIListView <string>(); listViewer.Header = "Asset List"; listViewer.OnDrawItem = (rect, index) => { Rect indexRect = new Rect(rect.x, rect.y, 20, rect.height); EditorGUI.PrefixLabel(indexRect, new GUIContent("" + index)); Rect itemRect = new Rect(rect.x + indexRect.width, rect.y, rect.width - indexRect.width, rect.height); EditorGUI.LabelField(itemRect, listViewer.GetItem(index)); }; listViewer.AddItems(files.ToArray()); } EGUILayout.DrawHorizontalLine(); if (listViewer != null) { Rect lastRect = EditorGUILayout.GetControlRect(false, 300, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true)); if (Event.current.type == EventType.Repaint) { listViewer.OnGUI(lastRect); } } } EditorGUILayout.EndVertical(); }
protected override void OnDrawProperty(string label) { label = label ?? ""; object value = DrawerProperty.Value; EditorGUI.BeginChangeCheck(); { value = EGUILayout.DrawEnumButton(label, (Enum)value, GetLayoutOptions()); } if (EditorGUI.EndChangeCheck()) { DrawerProperty.Value = Enum.ToObject(DrawerProperty.ValueType, value); } }
public override void OnInspectorGUI() { EGUILayout.DrawScript(nodeBehaviour); scrollPos = EditorGUILayout.BeginScrollView(scrollPos); { isBindNodeFoldout = EditorGUILayout.Foldout(isBindNodeFoldout, Contents.BindTitleContent, true); if (!isBindNodeFoldout) { if (bindNodeRList == null) { bindNodeRList = CreateRList(Contents.BindTitleContent, NodeType.BindNode, bindNodes); } bindNodeRList.DoLayoutList(); } isBoneNodeFoldout = EditorGUILayout.Foldout(isBoneNodeFoldout, Contents.BoneTitleContent, true); if (!isBoneNodeFoldout) { if (boneNodeRList == null) { boneNodeRList = CreateRList(Contents.BoneTitleContent, NodeType.BoneNode, boneNodes); } boneNodeRList.DoLayoutList(); } isRendererNodeFoldout = EditorGUILayout.Foldout(isRendererNodeFoldout, Contents.RendererTitleContent, true); if (!isRendererNodeFoldout) { if (smRendererNodeRList == null) { smRendererNodeRList = CreateRList(Contents.RendererTitleContent, NodeType.SMRendererNode, smRendererNodes); } smRendererNodeRList.DoLayoutList(); } } EditorGUILayout.EndScrollView(); if (GUI.changed) { nodeBehaviour.bindNodes = bindNodes.ToArray(); nodeBehaviour.boneNodes = boneNodes.ToArray(); nodeBehaviour.smRendererNodes = smRendererNodes.ToArray(); EditorUtility.SetDirty(target); } }
private void DrawPackOperation() { if (bundleBuildConfig == null) { bundleBuildConfig = AssetPackerUtil.ReadBuildData(); } EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.ExpandHeight(true), GUILayout.ExpandWidth(true)); { EditorGUILayout.LabelField(Contents.BuildTitleContent, EGUIStyles.MiddleCenterLabel); EditorGUI.BeginChangeCheck(); { EGUI.BeginLabelWidth(120); { bundleBuildConfig.OutputDir = EGUILayout.DrawDiskFolderSelection(Contents.BuildOutputDirStr, bundleBuildConfig.OutputDir); bundleBuildConfig.CleanupBeforeBuild = EditorGUILayout.Toggle(Contents.BuildCleanup, bundleBuildConfig.CleanupBeforeBuild); bundleBuildConfig.PathFormat = (BundlePathFormatType)EditorGUILayout.EnumPopup(Contents.BuildPathFormatContent, bundleBuildConfig.PathFormat); EditorGUILayout.Space(); bundleBuildConfig.IsForceRebuild = EditorGUILayout.Toggle(Contents.ForceRebuild, bundleBuildConfig.IsForceRebuild); bundleBuildConfig.Target = (ValidBuildTarget)EditorGUILayout.EnumPopup(Contents.BuildTargetContent, bundleBuildConfig.Target); bundleBuildConfig.Compression = (CompressOption)EditorGUILayout.EnumPopup(Contents.BuildCompressionContent, bundleBuildConfig.Compression); } EGUI.EndLableWidth(); } if (EditorGUI.EndChangeCheck()) { AssetPackerUtil.WriteBuildData(bundleBuildConfig); } GUILayout.FlexibleSpace(); EGUI.BeginGUIBackgroundColor(Color.red); { if (GUILayout.Button(Contents.OperationAutoBuildContent, GUILayout.Height(80), GUILayout.ExpandWidth(true))) { EditorApplication.delayCall += () => { AssetPackerUtil.BuildAssetBundles(packerData, bundleBuildConfig); }; } } EGUI.EndGUIBackgroundColor(); } EditorGUILayout.EndVertical(); }
public override void OnInspectorGUI() { EGUILayout.DrawScript(target); ruler.Platform = EGUILayout.StringPopup("Platform", ruler.Platform, PlatformContents); ruler.MaxSize = EGUILayout.DrawPopup <int>("MaxSize", MaxSizeContents, MaxSizeValues, ruler.MaxSize); if (ruler.Platform == PlatformContents[0]) { ruler.Format = EGUILayout.DrawPopup <int>("Format", StandaloneFormatContents, StandaloneFormatValues, ruler.Format); } else if (ruler.Platform == PlatformContents[1]) { ruler.Format = EGUILayout.DrawPopup <int>("Format", AndroidFormatContents, AndroidFormatValues, ruler.Format); } else if (ruler.Platform == PlatformContents[2]) { ruler.Format = EGUILayout.DrawPopup <int>("Format", iPhoneFormatContents, iPhoneFormatValues, ruler.Format); } }
public override void OnInspectorGUI() { if (attr != null) { EGUILayout.DrawScript(target); DrawerSetting.OnDrawSetting(); EGUI.BeginLabelWidth(attr.LabelWidth); { drawerObject.OnGUILayout(); } EGUI.EndLableWidth(); } else { base.OnInspectorGUI(); } }
protected internal override void OnGUI(Rect rect) { GUILayout.BeginArea(rect); { scrollPos = EditorGUILayout.BeginScrollView(scrollPos, EditorStyles.helpBox); { EGUILayout.DrawBoxHeader("Assembly Type List", GUILayout.ExpandWidth(true)); foreach (var typeData in assemblyTypes) { if (!typeData.IsStruct() && !typeData.IsEnum()) { continue; } string fullName = typeData.Type.FullName; if (!string.IsNullOrEmpty(searchText) && fullName.ToLower().IndexOf(searchText.ToLower()) < 0) { continue; } if (genConfig.callCSharpTypeNames.IndexOf(fullName) < 0 && genConfig.callLuaTypeNames.IndexOf(fullName) < 0) { continue; } bool isSelected = genConfig.optimizeTypeNames.IndexOf(fullName) >= 0; bool tempIsSelected = EditorGUILayout.ToggleLeft(typeData.Type.FullName, isSelected); if (tempIsSelected != isSelected) { if (tempIsSelected) { genConfig.optimizeTypeNames.Add(fullName); } else { genConfig.optimizeTypeNames.Remove(fullName); } } } } EditorGUILayout.EndScrollView(); } GUILayout.EndArea(); }
internal static void OnDrawSetting() { EGUILayout.DrawHorizontalSpace(8); EGUI.BeginGUIColor(Color.grey); { EditorGUILayout.BeginVertical(EditorStyles.helpBox); { EGUILayout.DrawBoxHeader("Native Drawer Setting", GUILayout.ExpandWidth(true)); EGUI.BeginIndent(); { IsShowHelp = EditorGUILayout.Toggle("Is Show Help", IsShowHelp); } EGUI.EndIndent(); } EditorGUILayout.EndVertical(); } EGUI.EndGUIColor(); EGUILayout.DrawHorizontalSpace(8); }
protected override void OnDrawProperty(string label) { string value = DrawerProperty.GetValue <string>(); var attr = GetAttr <OpenFilePathAttribute>(); EditorGUI.BeginChangeCheck(); { if (attr.Filters != null && attr.Filters.Length > 0) { value = EGUILayout.DrawOpenFileWithFilter(label, value, attr.Filters, attr.IsAbsolute); } else { value = EGUILayout.DrawOpenFile(label, value, attr.Extension, attr.IsAbsolute); } } if (EditorGUI.EndChangeCheck()) { DrawerProperty.Value = value; } }