内容简介:Unity3D研究院编辑器之Mac的Profiler窗口固定不可被失去焦点(二十六)
Window是没这问题的,然而Mac上所有Unity自带的窗口基本就是这样。比如Profiler窗口,随便在Unity主窗口中点击一下, Unity主界面就把Profiler窗口盖住了。。 很蛋疼啊。
其实Unity的窗口是可以设置焦点类型的。只是系统窗口,c#是访问不到的,不要紧我们可以用强大反射功能。。
如下代码所示,做了一个新的菜单,让Mac使用呼出Profiler窗口。
[MenuItem ("Window/Profiler(Mac)")]
static void ProfilerMac ()
{
var type = typeof(EditorWindow).Assembly.GetType("UnityEditor.ProfilerWindow");
EditorWindow.GetWindow(type,true);
}
如下图所示,Profiler窗口已经固定住了, 在右边我可以随意用鼠标点选资源了。 Profiler窗口也不会被挡住了。
如果你想设置别的系统窗口,Unity的系统窗口如下。
UnityEditor.SceneView
UnityEditor.GameView
UnityEditor.InspectorWindow
UnityEditor.SceneHierarchyWindow
UnityEditor.ProjectBrowser
UnityEditor.AnimationWindow
UnityEditor.ProfilerWindow
UnityEditor.AudioMixerWindow
UnityEditor.AssetStoreWindow
UnityEditor.Graphs.ParameterControllerEditor
UnityEditor.Graphs.AnimatorControllerTool
UnityEditor.Sprites.PackerWindow
UnityEditor.LightingWindow
UnityEditor.OcclusionCullingWindow
UnityEditor.FrameDebuggerWindow
UnityEditor.NavMeshEditorWindow
UnityEditor.ConsoleWindow
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Learn Python the Hard Way
Zed A. Shaw / Addison-Wesley Professional / 2013-10-11 / USD 39.99
Master Python and become a programmer-even if you never thought you could! This breakthrough book and CD can help practically anyone get started in programming. It's called "The Hard Way," but it's re......一起来看看 《Learn Python the Hard Way》 这本书的介绍吧!