Hello everyone,
I’ve been getting this error in unity while trying to set an EventRefrence in the inspector after building.
Here’s the error:
NullReferenceException: Object reference not set to an instance of an object
FMODUnity.EventBrowser+TreeView+<>c.b__35_0 (FMODUnity.EditorEventRef e) (at Assets/Plugins/FMOD/src/Editor/EventBrowser.cs:264)
System.Linq.Enumerable+WhereSelectListIterator2[TSource,TResult].ToArray () (at <864870be861f4ce0a54a99d6c7a77a21>:0) System.Linq.Buffer
1[TElement]…ctor (System.Collections.Generic.IEnumerable1[T] source) (at <864870be861f4ce0a54a99d6c7a77a21>:0) System.Linq.OrderedEnumerable
1+d__3[TElement].MoveNext () (at <864870be861f4ce0a54a99d6c7a77a21>:0)
System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable1[T] source) (at <864870be861f4ce0a54a99d6c7a77a21>:0) FMODUnity.EventBrowser+TreeView.CreateSubTree[T] (System.String rootName, System.String rootPath, System.Collections.Generic.IEnumerable
1[T] sourceRecords, System.Func2[T,TResult] GetPath, System.Func
3[T1,T2,TResult] MakeUniquePath) (at Assets/Plugins/FMOD/src/Editor/EventBrowser.cs:318)
FMODUnity.EventBrowser+TreeView.BuildRows (UnityEditor.IMGUI.Controls.TreeViewItem root) (at Assets/Plugins/FMOD/src/Editor/EventBrowser.cs:263)
UnityEditor.IMGUI.Controls.TreeView+TreeViewControlDataSource.FetchData () (at <1650f973f32045d6bc81eca6beea8ea9>:0)
UnityEditor.IMGUI.Controls.TreeViewDataSource.ReloadData () (at <1650f973f32045d6bc81eca6beea8ea9>:0)
UnityEditor.IMGUI.Controls.TreeView+TreeViewControlDataSource.ReloadData () (at <1650f973f32045d6bc81eca6beea8ea9>:0)
UnityEditor.IMGUI.Controls.TreeViewController.ReloadData () (at <1650f973f32045d6bc81eca6beea8ea9>:0)
UnityEditor.IMGUI.Controls.TreeView.Reload () (at <1650f973f32045d6bc81eca6beea8ea9>:0)
FMODUnity.EventBrowser.ReadEventCache () (at Assets/Plugins/FMOD/src/Editor/EventBrowser.cs:99)
FMODUnity.EventBrowser.BeginInspectorPopup (UnityEditor.SerializedProperty property, FMODUnity.EventBrowser+TypeFilter typeFilter) (at Assets/Plugins/FMOD/src/Editor/EventBrowser.cs:1600)
FMODUnity.EventBrowser.ChooseEvent (UnityEditor.SerializedProperty property) (at Assets/Plugins/FMOD/src/Editor/EventBrowser.cs:1564)
FMODUnity.EventReferenceDrawer.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at Assets/Plugins/FMOD/src/Editor/EventRefDrawer.cs:81)
UnityEditor.PropertyDrawer.OnGUISafe (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at <1650f973f32045d6bc81eca6beea8ea9>:0)
UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at <1650f973f32045d6bc81eca6beea8ea9>:0)
UnityEditor.GenericInspector.OnOptimizedInspectorGUI (UnityEngine.Rect contentRect) (at <1650f973f32045d6bc81eca6beea8ea9>:0)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.b__0 () (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Here’s the thing. This happens only if I previously built FMOD since I opened the project. Before I build it, the event browser opens but, it’s missing the last two events I added in the project. Then again if I try to build I start getting the error every time I click on the search button for event references in the inspector.
I honestly have no idea why this is happening. I can’t find any other discussion that solves my specific problem at least. I tried reinstalling FMOD and I get the same error over and over again.
Any help would be much appreciated, thank you in advance!