Issue with UCC 2.4.7 / Unity 2021.2.19f1: Inspector presets don't work

brl0000

New member
I've noticed when trying to use UCC 2.4.7 with a clean install of 2021.2.19f1, that Inspector presets no longer work when clicking on the icon in the inspector tab. Instead I'm seeing this console error, and the preset dialog never appears:

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Presets.PresetSelector+<>c__DisplayClass24_0.<FindAllPresetsOfType>b__1 (UnityEditor.Presets.Preset preset) (at <780782bc035845f9909cebbd4c983ae3>:0)
System.Linq.Utilities+<>c__DisplayClass1_0`1[TSource].<CombinePredicates>b__0 (TSource x) (at <1e18c5a6594041c9844bfd0b6618ee4a>:0)
System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].ToArray () (at <1e18c5a6594041c9844bfd0b6618ee4a>:0)
System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <1e18c5a6594041c9844bfd0b6618ee4a>:0)
UnityEditor.Presets.PresetSelector.UpdateSearchResult (System.Int32 currentSelection) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.Presets.PresetSelector.Init (UnityEditor.Presets.PresetType presetType, UnityEditor.Presets.Preset currentSelection, System.Boolean createNewAllowed, UnityEditor.Presets.PresetSelectorReceiver eventReceiver) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.Presets.PresetSelector.Init (UnityEngine.Object target, UnityEditor.Presets.Preset currentSelection, System.Boolean createNewAllowed, UnityEditor.Presets.PresetSelectorReceiver eventReceiver) (at <780782bc035845f9909cebbd4c983ae3>:0)

If I remove the entire /Assets/Opsive folder, the inspector presets function as normal. I've repeated this a couple of times, so I'm pretty sure there's some incompatibility there. Apologies if I've missed a release note somewhere mentioning this. But has anyone else run into this issue? Thanks
 
I would report this to Unity - looking at that call stack there isn't anything that is called by the character controller so it's out of our control
 
I would report this to Unity - looking at that call stack there isn't anything that is called by the character controller so it's out of our control

Thanks Justin. My apologies, the entire call stack didn't paste in. Here it is, in full:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Presets.PresetSelector+<>c__DisplayClass24_0.<FindAllPresetsOfType>b__1 (UnityEditor.Presets.Preset preset) (at <780782bc035845f9909cebbd4c983ae3>:0)
System.Linq.Utilities+<>c__DisplayClass1_0`1[TSource].<CombinePredicates>b__0 (TSource x) (at <1e18c5a6594041c9844bfd0b6618ee4a>:0)
System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].ToArray () (at <1e18c5a6594041c9844bfd0b6618ee4a>:0)
System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <1e18c5a6594041c9844bfd0b6618ee4a>:0)
UnityEditor.Presets.PresetSelector.UpdateSearchResult (System.Int32 currentSelection) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.Presets.PresetSelector.Init (UnityEditor.Presets.PresetType presetType, UnityEditor.Presets.Preset currentSelection, System.Boolean createNewAllowed, UnityEditor.Presets.PresetSelectorReceiver eventReceiver) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.Presets.PresetSelector.Init (UnityEngine.Object target, UnityEditor.Presets.Preset currentSelection, System.Boolean createNewAllowed, UnityEditor.Presets.PresetSelectorReceiver eventReceiver) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.Presets.PresetSelector.ShowSelector (UnityEngine.Object target, UnityEditor.Presets.Preset currentSelection, System.Boolean createNewAllowed, UnityEditor.Presets.PresetSelectorReceiver eventReceiver) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.Presets.PresetContextMenu.CreateAndShow (UnityEngine.Object[] targets) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.Presets.PresetSelector.DrawPresetButton (UnityEngine.Rect rectangle, UnityEngine.Object[] targets) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.EditorGUIUtility.DrawEditorHeaderItems (UnityEngine.Rect rectangle, UnityEngine.Object[] targetObjs, System.Single spacing) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.EditorGUI.DoInspectorTitlebar (UnityEngine.Rect position, System.Int32 id, System.Boolean foldout, UnityEngine.Object[] targetObjs, UnityEditor.SerializedProperty enabledProperty, UnityEngine.GUIStyle baseStyle) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.EditorGUI.InspectorTitlebar (UnityEngine.Rect position, System.Boolean foldout, UnityEditor.Editor editor) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.EditorGUILayout.InspectorTitlebar (System.Boolean foldout, UnityEditor.Editor editor) (at <780782bc035845f9909cebbd4c983ae3>:0)
UnityEditor.UIElements.EditorElement.DrawEditorSmallHeader (UnityEditor.Editor[] editors, UnityEngine.Object target, System.Boolean wasVisible) (at <3d6ac16e3c754a199373804b462a1b72>:0)
UnityEditor.UIElements.EditorElement.DrawEditorHeader (UnityEditor.Editor[] editors, UnityEngine.Object target, System.Boolean& wasVisible) (at <3d6ac16e3c754a199373804b462a1b72>:0)
UnityEditor.UIElements.EditorElement.HeaderOnGUI () (at <3d6ac16e3c754a199373804b462a1b72>: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 <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <f23cc42ed8af4b73afc7c74ab921aa08>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <f0d008a86f5e41eda07a8cec48955104>:0)

Let me know if it's still the case that UCC doesn't call any of these, and I'll report a bug to Unity. Thanks!

Edit:
I've further narrowed down the potential source of the issue: If I only delete everything inside /Assets/Opsive/UltimateCharacterController/Demo/Presets/, the Inspector presets dialog functions again as normal.

I'm seeing the same behavior with 2021.3.2f1 LTS
 
Last edited:
Top