llealloo / audiolink

Audio reactive prefabs for VRChat
Other
354 stars 40 forks source link

NullReferenceException whenever using the "Link all sound reacive objects to this AudioLink" #162

Closed TurboTheSergal closed 2 years ago

TurboTheSergal commented 2 years ago

If this is not the right place to report bugs or there is already a thread about this error i am terribly sorry this is my first time using the GitHub issues Tab (i made an account due to this)

Unity Version: 2019.4.31f1 Imported things:

Opened Example scene pressed "Link all sound reacive objects to this AudioLink" Found in the audio Link but everytime i do it, no matter what AudioLink no matter what UnityProject i always get this error:

NullReferenceException: Object reference not set to an instance of an object VRCAudioLink.AudioLinkEditor.LinkAll () (at Assets/AudioLink/Scripts/AudioLink.cs:409) VRCAudioLink.AudioLinkEditor.OnInspectorGUI () (at Assets/AudioLink/Scripts/AudioLink.cs:399) UdonSharpEditor.UdonBehaviourOverrideEditor.OnInspectorGUI () (at Assets/UdonSharp/Editor/Editors/UdonSharpBehaviourEditor.cs:507) UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <3d9f46ac475f4fa9a3b71bacf80244a8>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I have tried reinstalling Unity. I have checked everything is up to date. I have tried both an Example Scene and the "Getting Started".

I have yet to find a Solution. If you need any further info just ask.

Is this just me reading the Setup wrong since its my first time using AudioLink in general?

KevBal commented 2 years ago

Same, narrowed it down to several AL shaders failing to compile. If any of the shaders are pink Link is going to fail.

I currently have two versions of a world using the same .27 version of AL. One had audio link added fresh, and works flawlessly. The other is a cleaned version of the project that had audio link imported to cover the dependencies of the imported cleaned scene, this version fails to compile about 5 shaders.

I shutdown unity, followed the upgrade method and relaunched, reimported and the shader compile failed again.

Shutting down Unity and deleting the Library fixed AL, 2 shaders/materials are flagged as "Hidden/InternalErrorShader" mat_InternalAudioLinkInLeft and Right and AL still fails to Link AL sources. However AL is now working in game and that's all that matters to me.

pema99 commented 2 years ago

Hey, sorry for missing this. I can reproduce the issue, investigating.

pema99 commented 2 years ago

Hey. This seems to be caused by the 'Profiler' GameObject in the example scene. As a workaround, you can just delete it. Should be fixed in next release.