UPDATE: I’ve manually updated the paths for all the events using the wrench icon for every Event Reference variable I have on my prefabs/SOs. The issue still persists when running the Updater tool. It could be that it gets “stuck” on either a scene or project asset.
I’ve updated paths in FMOD Studio, and when I used the Event Reference Updater tool in Unity, several issues came up:
Almost right off the bat, got a Null Reference exception.
It couldn’t scan all the assets in the project.
Got two Stack Overflow errors (both are the same in the attached file).
When clicking “Execute Selected Tasks” anyway for the ones it found, it fixed some broken paths, but not all the ones it managed to locate.
It located over 1400 references to fix before it stopped. But there are so many scan results that are duplicates. For example, one scan result is a scriptable containing a reference to a prefab, where said prefab was where the actual FMOD event reference. So the prefab’s enough, I don’t see a need to list the scriptable object or fix it. And so many in the 1400 results are similar cases to this.
Both the null reference and stack overflow exceptions occur in the GetGenericUpdateTasks function. I’m adding a text file containing the error call stacks if it helps. FMOD Event Updater Errors.txt (3.2 KB)
I’ve attached both player and editor logs. For these logs, I’ve launched Unity and the project, and afterwards did nothing but use the Event Reference Updater tool.
What FMOD versions were you updating from & to?
I wasn’t updating FMOD versions. FMOD 2.02.20 is the one and only studio and plugin versions used in the project (not from the start of the project but much later).
What happened is that the event paths were changed on the FMOD Studio side, and I wanted to update them on Unity’s side in the prefabs, so I used the Updater tool for it. The rest is as I described in my original post.
My only guess is that it hits a circular call between some prefabs/scriptable objects that reference each other.
Ah that is good to know, thank you very much for the log files. I have created a task to investigate this further and hopefully we can get a fix out in an upcoming release.
Hey, we also suffer from a similar problem with the Event Reference Updater Tool and we’re also on version 2.02.20, Unity version is 2021.3.29f1. We did upgrade from 2.02.04. When calling Scan in the tool, we also get exceptions. Investigation lead to “target” being null in the GetGenericUpdateTasks method, breaking recursion.
It’s also worth mentioning it also gave an UnassignedReferenceException about some arbitrary (private/protected non-serialized) properties along the way. It’s probably nothing since reflection is used to access them but it might be relevant.
I’m unable to upload files since this is a new account, so I’ll post it here:
NullReferenceException: Object reference not set to an instance of an object
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:520)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:692)
FMODUnity.EventReferenceUpdater+d__37.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:337)
FMODUnity.EventReferenceUpdater+d__34.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:230)
System.Linq.Enumerable+ConcatIterator`1[TSource].MoveNext () (at :0)
FMODUnity.EventReferenceUpdater.UpdateProcessing () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:1761)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <1e8c82ffe64a4e1d8e997fa7e5933f70>:0)
UnassignedReferenceException: The variable myRT of TooltipOwner has not been assigned.
You probably need to assign the myRT variable of the TooltipOwner script in the inspector.
UnityEngine.Transform+Enumerator.MoveNext () (at <91dc399f41a440558c716315c7e834ab>:0)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:690)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:692)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:692)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__35.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:263)
System.Linq.Enumerable+ConcatIterator`1[TSource].MoveNext () (at :0)
FMODUnity.EventReferenceUpdater.UpdateProcessing () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:1761)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <1e8c82ffe64a4e1d8e997fa7e5933f70>:0)
NullReferenceException: Object reference not set to an instance of an object
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:520)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:692)
FMODUnity.EventReferenceUpdater+d__45.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:701)
FMODUnity.EventReferenceUpdater+d__37.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:337)
FMODUnity.EventReferenceUpdater+d__36.MoveNext () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:307)
System.Linq.Enumerable+ConcatIterator`1[TSource].MoveNext () (at :0)
FMODUnity.EventReferenceUpdater.UpdateProcessing () (at Assets/Plugins/FMOD/src/Editor/EventReferenceUpdater.cs:1761)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <1e8c82ffe64a4e1d8e997fa7e5933f70>:0)
Would love to see a fix for this ASAP, since we currently have no way to track changed event reference paths. We could still upgrade to 2.02.21, but reading the change log I don’t expect it to fix this issue.
I keep trying a couple times every now and then in hopes of maybe something’s changed with the project and it can now scan properly. Unfortunately no such luck.
What I don’t really understand is why does this tool need to count nested referencing - so to speak - of the EventReference type variables?
I get results that are like: a prefab that has a script, which includes a reference to another script, that references yet another prefab that holds a script where the EventReference type is… This also means that this same variable will show up in the scan results as many times as its owning prefab/script is referenced in other prefabs/scripts.
Is it not possible to just count the scripts that directly have an EventReference type in their variables, and the game objects which directly use the FMOD Studio Event Emitter component?
I am investigating this at them moment, although having trouble reproducing the issue exceptions myself.
One theory I have is that the EventReferenceUpdater encounters a type that is unknown to it, possibly a type that is defined in an external plugin or library that FMOD doesn’t have knowledge of and may not be loaded until runtime. Does this sound like it could be possible in your projects?
All three callstacks look like they are related to a ScriptableObject if that helps narrow the search.
All I can tell from this is that it’s coming from a prefab.
That is a fair point and I believe that is also the cause of the stack overflow crash.
It’s worth mentioning that downgrading from 2.02.20 to 2.02.07 fixed all my issues and restored the tool so my guess is that it’s not an unknown type causing the issue but rather due to changes made to the tool between these versions.
As far as I can remember, the nullref came from a GetType() call on the object “target” in aforementioned method, where target was null, causing the exception.
Thanks for the tip! I guess that’s the only solution for now - to downgrade, run the tool, and then upgrade again. Won’t be very useful after 2.03 version is official though.
Thank you for bringing this to our attention. I am currently working on the issue.
Would it be possible to get a copy of your Unity project or a stripped-down version displaying the issue uploaded to your profile? Please note you must register a project with us before uploading files.
If that is not possible, could I get any objects or scripts you think may be causing the issue uploaded instead?
Thank you for looking into this. This is the company account of the OP and the project has been uploaded to this profile under the name “FMod.zip”.
The audio assets themselves have been removed, but the bug is still there with the Event Ref Updater tool that shows a null reference error when it’s used.
Hi, I’m using Unity 2022.3.16f1 with FMOD 2.02.24 and I can’t use the Event Reference Updater because it throws a couple of errors. Here’s the error it’s throwing:
From what I can see, it’s apparently trying to get an IEnumerator from a NativeList, but even though NativeLists implements the IEnumerable interface, they don’t implement the GetEnumerator() interface method.
Hi, sorry for taking so long to answer, busy week.
As for sharing a script, I’m not sure what to share. In Unity, I’m just clicking FMOD > Update Event References > Scan, then it starts scanning but after some seconds I get this error a couple of times on my console and then the scan fails, as in, no tasks are displayed in the window.
Now, with that said, I guess I should’ve mentioned that I am using Unity’s Network for GameObjects package (com.unity.netcode.gameobjects, version 1.7.1, specifically) for multiplayer, which does include a bunch of NativeArray/Lists uses, so I’m guessing that’s probably the source for the errors.
I did a closer look at which object the tool is trying to call GetEnumerator() on and, indeed, in the EventReferenceUpdater.GetGenericUpdateTasks() method, the target object seems to be NetworkEventQueue from the Unity’s Unity.Networking.Transport namespace, which DOES indeed have some NativeList fields. The GameObject/Component this search is being executed on seems to be the NetworkManager, which I need to place in my scene in order to start the multiplayer.
I just did a test by creating an empty project (Unity 2022.3.42f1, but I’m guessing any 2022.3 should do), then adding the Netcode for Game Objects package (in this case it was version 1.10.0) and the FMOD pluging (version 2.02.24), then I’ve configured the plugin by selecting a random FMOD project in my computer (I think it shouldn’t matter since I’m not adding gonna use any events) and then, in an empty scene, I’ve added a GameObject, added the NetworkMager component and selected “Unity Transport” in the inspector.
After that, if I select FMOD > Update Event References > Scan, I get this exact error in the console.