CsoundUnity Error DrawAudioFilterGUI

Hi,
I am using Unity v2022.3 LTS and I imported the Csound GIT asset through the Package Manager. Everything appears correct and I am receiving debug log messages that Csound is working BUT when I run the BasicTest example scene I receive the following error:

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.AudioFilterGUI.DrawAudioFilterGUI (UnityEngine.MonoBehaviour behaviour) (at :0)
UnityEditor.Editor.DoDrawDefaultInspector () (at :0)
UnityEditor.Editor.DrawDefaultInspector () (at :0)
CsoundUnityEditor.OnInspectorGUI () (at ./Library/PackageCache/com.csound.csoundunity@e192bdd051/Editor/CsoundUnityEditor.cs:127)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass72_0.b__0 () (at :0)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

It appears anytime I click on the interface in the inspector. Thoughts?

Yes I am aware of this, it is harmless so no worries. In the next days I’ll have a look to see if it can be avoided, it is an internal Unity error that triggers once or twice when it tries to draw the VU meter bars on top of the CsoundUnity inspector. You won’t have the error on a build.

I just pushed a fix in this branch:

https://github.com/rorywalsh/CsoundUnity.git#fix/editor-inspector-null-refs

Use the above link in the Unity Package Manager

A try catch was enough to get rid of the error.

Version 3.5 will be out soon with this fix and two new features, WebGL support and the ability of setting the sampling and control rate.