1.安装:在Editor文件夹创建一个C#脚本,将代码复制进去。 2.在菜单栏中找到EditorWindowMinimize/Open,打开窗口。 3.添加窗口:单击SelectWindow按钮,随后点击打开的窗口,当窗口出现在下方即为添加成功。 添加窗口 4.最小化/最大化窗口:点击下方的按钮来打开和关闭(红色为窗口关闭,绿色为正常,蓝色为最小化),当窗口...
using UnityEditor; public class ExampleWindow : EditorWindow { const string SIZE_WIDTH_KEY = "ExampleWindow size width"; const string SIZE_HEIGHT_KEY = "ExampleWindow size height"; [MenuItem ("Window/Example")] static void Open () { GetWindow <ExampleWindow> (); } void OnEnable () { ...
9 public class EditorWindowBase : EditorWindow 10 { 11 /// 12 /// 界面层级管理,根据界面优先级访问界面焦点 13 /// 14 public int Priority { get; set; } 15 16 private void OnFocus() 17 { 18 //重写OnFocus方法,让EditorWindowMgr去自动排序汇聚焦点 19 EditorWindowMgr.FoucusWindow(); 2...
根据界面优先级访问界面焦点13///14publicintPriority {get;set; }1516privatevoidOnFocus()17{18//重写OnFocus方法,让EditorWindowMgr去自动排序汇聚焦点19EditorWindowMgr.Fouc
QuestWindow questWindow; public GUI_Menu inventory; private GameObject player; public static bool resetMessageBox; public static bool disableNext; //Editor Variable [HideInInspector] public int sizeDialog=0; [HideInInspector] public int sizeDialogQuest=0; [HideInInspector] public int sizeDialogQuest...
(hWnd, GWL_EXSTYLE, WS_EX_LAYERED); // 设置窗口的透明度属性,这里设置为颜色键模式 //第二个值就是要替换的颜色,对应颜色将置为透明 SetLayeredWindowAttributes(hWnd, 0, 0, LWA_COLORKEY); // 将窗口设置为置顶 SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, 0); #endif // 设置主摄像机的...
Through these three simple values, you can set an object’s location and even move an object in the direction of a vector. Components You add functionality to GameObjects by adding Components. Everything you add is a Component and they all show up in the Inspector window. There are Mesh...
EditorPrefs提供了四种数据的保存:int,float,string,bool。通过Set方法保存数据,下次则通过Get方法来获取数据,HasKey方法可以判断是否存在该数据的保存,删除数据调用DeleteKey方法即可。 usingUnityEngine;usingUnityEditor;publicclassWindowExample2:EditorWindow{privatestaticWindowExample2window;//窗体实例privatestringtempMsg...
而此时,只需要再调用EditorUtility.SetDirty( Object )方法即可。 如果要使用方法二,则需要在 Editor 代码中写: if(GUILayout.Button("Click Me")){ //Logic serializedObject.FindProperty("Name").stringValue="Codinggamer"; serializedObject.ApplyModifiedProperties; ...
window.maxSize = new Vector2(500, 1000); window.Show(); } private void OnGUI() { CreateTextureImport(); } void CreateTextureImport() { EditorGUILayout.BeginVertical("Box"); { CreateSetPath(); EditorGUILayout.Space(10); CreateTextureImporterFormat(); ...