leinlin / Miku-LuaProfiler

Apache License 2.0
1.9k stars 439 forks source link

弄的Server那个工程打开window就报错 #4

Open pl01898759 opened 5 years ago

pl01898759 commented 5 years ago

NullReferenceException: Object reference not set to an instance of an object MikuLuaProfiler.GuiSkinManager+GuiStyleManager..ctor () (at Assets/LuaProfilerServer/Assets/Editor/Skin/GuiSkinManager.cs:107) MikuLuaProfiler.GuiSkinManager.get_Styles () (at Assets/LuaProfilerServer/Assets/Editor/Skin/GuiSkinManager.cs:200) MikuLuaProfiler.LuaProfilerWindow.DoChart () (at Assets/LuaProfilerServer/Assets/Editor/TreeView/LuaProfilerWindow.cs:504) MikuLuaProfiler.LuaProfilerWindow.OnGUI () (at Assets/LuaProfilerServer/Assets/Editor/TreeView/LuaProfilerWindow.cs:189) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336) UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310) UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361) UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320) UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:244) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

leinlin commented 5 years ago

直接用Unity 5.6以上版本打开 LuaProfilerServer 即可...

lizijie commented 5 years ago

@pl01898759 看了下第107行代码Assets/LuaProfilerServer/Assets/Editor/Skin/GuiSkinManager.cs:107 资源加载导致的报错,建议@pl01898759看下你本地工程的资源路径对不对,同时GUISkin是否引用了Font TIM截图20190520143247 image

leinlin commented 3 years ago

用最新的代码