Closed sabresaurus closed 3 years ago
TypesPriority.SelectPrioritizedComponents() throws a Null Ref if an object in the hierarchy has a missing component
NullReferenceException: Object reference not set to an instance of an object AV.Hierarchy.TypesPriority+<SelectPrioritizedComponents>d__4.MoveNext () (at Library/PackageCache/com.av.smart-hierarchy@41ed90624a/Base/TypesPriority.cs:66) System.Collections.Generic.LargeArrayBuilder`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] items) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) System.Collections.Generic.EnumerableHelpers.ToArray[T] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) AV.Hierarchy.Components.ChooseMainComponent (UnityEngine.Component[] components) (at Library/PackageCache/com.av.smart-hierarchy@41ed90624a/Components/Components.cs:70) AV.Hierarchy.Components..ctor (UnityEngine.GameObject instance) (at Library/PackageCache/com.av.smart-hierarchy@41ed90624a/Components/Components.cs:28) AV.Hierarchy.ViewItem..ctor (UnityEngine.GameObject instance) (at Library/PackageCache/com.av.smart-hierarchy@41ed90624a/Base/ViewItem.cs:47) AV.Hierarchy.SmartHierarchy.GetInstanceViewItem (System.Int32 id, UnityEngine.GameObject instance, UnityEngine.Rect rect, AV.Hierarchy.ViewItem& item) (at Library/PackageCache/com.av.smart-hierarchy@41ed90624a/Base/SmartHierarchy.cs:244) AV.Hierarchy.SmartHierarchy.OnItemGUI (System.Int32 id, UnityEngine.Rect rect) (at Library/PackageCache/com.av.smart-hierarchy@41ed90624a/Base/SmartHierarchy.cs:145) AV.Hierarchy.SmartHierarchy.OnItemCallback (System.Int32 id, UnityEngine.Rect rect) (at Library/PackageCache/com.av.smart-hierarchy@41ed90624a/Base/SmartHierarchy.cs:121) AV.Hierarchy.SmartHierarchy.OnHierarchyItemGUI (System.Int32 id, UnityEngine.Rect rect) (at Library/PackageCache/com.av.smart-hierarchy@41ed90624a/Base/SmartHierarchy.cs:104) UnityEditor.SceneHierarchy.OnRowGUICallback (System.Int32 instanceID, UnityEngine.Rect rect) (at <a8e33794c0064f2aa201ade069162226>:0) UnityEditor.IMGUI.Controls.TreeViewController.DoItemGUI (UnityEditor.IMGUI.Controls.TreeViewItem item, System.Int32 row, System.Single rowWidth, System.Boolean hasFocus) (at <a8e33794c0064f2aa201ade069162226>:0) UnityEditor.IMGUI.Controls.TreeViewController.IterateVisibleItems (System.Int32 firstRow, System.Int32 numVisibleRows, System.Single rowWidth, System.Boolean hasFocus) (at <a8e33794c0064f2aa201ade069162226>:0) UnityEditor.IMGUI.Controls.TreeViewController.OnGUI (UnityEngine.Rect rect, System.Int32 keyboardControlID) (at <a8e33794c0064f2aa201ade069162226>:0) UnityEditor.SceneHierarchy.DoTreeView (System.Single searchPathHeight) (at <a8e33794c0064f2aa201ade069162226>:0) UnityEditor.SceneHierarchy.OnGUI (UnityEngine.Rect rect) (at <a8e33794c0064f2aa201ade069162226>:0) UnityEditor.SceneHierarchyWindow.DoSceneHierarchy () (at <a8e33794c0064f2aa201ade069162226>:0) UnityEditor.SceneHierarchyWindow.OnGUI () (at <a8e33794c0064f2aa201ade069162226>:0) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>: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 <9577ac7a62ef43179789031239ba8798>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <a8e33794c0064f2aa201ade069162226>:0) UnityEditor.HostView.Invoke (System.String methodName) (at <a8e33794c0064f2aa201ade069162226>:0) UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <a8e33794c0064f2aa201ade069162226>:0) UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <a8e33794c0064f2aa201ade069162226>:0) UnityEditor.DockArea.OldOnGUI () (at <a8e33794c0064f2aa201ade069162226>:0) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <06214b245dbb4d10a9cefd10639bb04e>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
TypesPriority.SelectPrioritizedComponents() throws a Null Ref if an object in the hierarchy has a missing component