public static void OpenGUILookWindows() { EditorStyleViewer win = EditorStyleViewer.GetWindow <EditorStyleViewer>(); win.titleContent = new GUIContent("GUI样式查看器"); win.Show(); }
public static void OpenFileEditorWindows() { EditorStyleViewer win = EditorStyleViewer.GetWindow <EditorStyleViewer>(); win.titleContent = new GUIContent("文件名检测工具"); win.Show(); }
public static void OpenMapEditorWindows() { MapWindows win = EditorStyleViewer.GetWindow <MapWindows>(); win.titleContent = new GUIContent("地图编辑器"); win.Show(); }
public static void Init() { EditorStyleViewer w = EditorWindow.GetWindow <EditorStyleViewer>(); w.title = "Editor Styles"; w.minSize = new Vector2(335, 400); w.totalSizeOfStyles = 0; w.usableSkins.Clear(); w.projectSkins.Clear(); w.guiSkins.Clear(); w.projectSkins = GetAssetsOfType <GUISkin>(".GUISkin"); w.usableSkins.Add(EditorGUIUtility.GetBuiltinSkin(EditorSkin.Game)); w.usableSkins.Add(EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector)); foreach (GUISkin s in w.projectSkins) { w.usableSkins.Add(s); } foreach (GUISkin s in w.usableSkins) { w.guiSkins.Add(s.name); } w.guiSkins[1] = "InspectorSkin"; w.LoadSkin(w.usableSkins[w.selSkin]); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); if (GUILayout.Button("EditorStyleViewer", GUILayout.Height(40))) { EditorStyleViewer.Init(); } }
public static void Init() { EditorStyleViewer w = EditorWindow.GetWindow <EditorStyleViewer>(); //w.title = "Editor Styles"; w.minSize = new Vector2(335, 400); w.totalSizeOfStyles = 0; w.stylePrefs = new StylePref[EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector).customStyles.Length]; w.initialCount = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector).customStyles.Length; w.eStyles = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector).customStyles; w.optionsMenu.AddItem(new GUIContent("Copy"), false, w.CopyItem); w.optionsMenu.AddItem(new GUIContent("Display Sample Text"), false, w.ShowSampleText); w.optionsMenu.AddItem(new GUIContent("Enable or Disable"), false, w.ToggleDisabled); w.UpdateListSize(); Debug.Log("View Size : " + w.totalSizeofView); }
public static void OpenWindow() { EditorStyleViewer window = EditorWindow.GetWindow <EditorStyleViewer>(); window.Show(); }