File tree Expand file tree Collapse file tree
Assets/Editor Toolbox/Editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3-
43// NOTE: Needed for EntityId
54#if UNITY_6000_4_OR_NEWER
65using UnityEngine ;
@@ -23,12 +22,12 @@ public static class ToolboxEditorHandler
2322
2423 private static void OnBeginEditor ( Editor editor )
2524 {
26- //NOTE: it means that last Editor was null or disposed, anyway we probably want to reload drawers-related cache
2725#if UNITY_6000_4_OR_NEWER
28- var lastId = lastCachedEditor . GetEntityId ( ) ;
26+ var lastId = lastCachedEditor != null ? lastCachedEditor . GetEntityId ( ) : default ;
2927#else
30- var lastId = lastCachedEditor . GetInstanceID ( ) ;
28+ var lastId = lastCachedEditor != null ? lastCachedEditor . GetInstanceID ( ) : default ;
3129#endif
30+ //NOTE: it means that last Editor was null or disposed, anyway we probably want to reload drawers-related cache
3231 if ( lastCachedEditor == null || lastCachedEditorId != lastId )
3332 {
3433 lastCachedEditor = editor ;
You can’t perform that action at this time.
0 commit comments