Xerios / ScreenManager

Flexible way to manage screens with transitions for Unity
MIT License
563 stars 69 forks source link

Null reference breaking inspector on ScreenManagerEditor after upgrading to Unity 2018.3 #12

Closed DanielPhk closed 5 years ago

DanielPhk commented 5 years ago

GUI.skin.FindStyle("TL tab mid") returns null. Other calls to FindStyle return null as well, not sure if Unity changed anything regarding GUIStyles...

NullReferenceException: Object reference not set to an instance of an object UnityEngine.GUILayoutEntry.ApplyStyleSettings (UnityEngine.GUIStyle style) (at C:/buildslave/unity/build/Modules/IMGUI/LayoutEntry.cs:67) UnityEngine.GUILayoutGroup.ApplyStyleSettings (UnityEngine.GUIStyle style) (at C:/buildslave/unity/build/Modules/IMGUI/LayoutGroup.cs:87) UnityEngine.GUILayoutEntry.set_style (UnityEngine.GUIStyle value) (at C:/buildslave/unity/build/Modules/IMGUI/LayoutEntry.cs:31) UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:303) UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:257) UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:249) ScreenMgr.ScreenManagerEditor.OnInspectorGUI () (at Assets/Plugins/ScreenManager-master/ScreenManager/Editor/ScreenManagerEditor.cs:193) UnityEditor.InspectorWindow.DoOnInspectorGUI (System.Boolean rebuildOptimizedGUIBlock, UnityEditor.Editor editor, System.Boolean wasVisible, UnityEngine.Rect& contentRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1625) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

cluetivity commented 5 years ago

Hi, I'm having similar issues with Unity 2018.3.1f1. Lots of errors in Editor and you don't see the list of Screens anymore.

Will try Unity 2018.3.3 now.

Edit: no difference with Unity 2018.3.3. Help is highly appreciated.

Xerios commented 5 years ago

I'll give it a look this afternoon and push a fix

cluetivity commented 5 years ago

thank you so much. did you have a chance to look into it?

Xerios commented 5 years ago

I completely got side-tracked, thanks for the weekend reminder. I pushed the fix 👍

DanielPhk commented 5 years ago

Awesome, thank you very much!