cancel
Showing results for 
Search instead for 
Did you mean: 

Build error when using visual scripting ("Effect OculusSpatializerReflection could not be found")

Sparkett3
Level 4

I have a test project in Unity and until now it's worked fine. But now I get the following error when I try to build it:

 

Error building Player: Effect OculusSpatializerReflection could not be found. Check that the project contains the correct native audio plugin libraries and that the importer settings are set up correctly.

 

I don't know why this would be occurring as I didn't touch the spatializer or audio setup. All I did was add a visual script on the CenterEyeAnchor to set the background color based on the distance between two objects. (The two objects are controlled by the eye tracking, one on each eye; I'm doing it to see how well the distance works as a Z axis.) Previously I didn't have any visual scripts in this project (or any custom scripts at all) so maybe that has something to do with it. I tried removing the visual script and that didn't fix it, but I'm still seeing the thing saying it's building the visual scripts, so maybe clearing out whatever is causing that would fix it? Still though, I'd like to be able to use visual scripting because I find it a lot more pleasant than code for experimentation purposes.

 

I tried Googling the error message, but the only result I found is from someone who was trying to play a game and running into an unrelated issue (related to it being a pirated copy) and a similar message happened to appear in the log file they posted.

2 REPLIES 2

Sparkett3
Level 4

Here's the stack trace:

 

Effect OculusSpatializerReflection could not be found. Check that the project contains the correct native audio plugin libraries and that the importer settings are set up correctly.
System.Linq.Enumerable/<OfTypeIterator>d__32`1<object>:MoveNext ()
Unity.VisualScripting.LinqUtility/<Concat>d__0`1<object>:MoveNext () (at Library/PackageCache/com.unity.visualscripting@1.7.8/Runtime/VisualScripting.Core/Utilities/LinqUtility.cs:15)
Unity.VisualScripting.AotPreBuilder/<FindAllProjectStubs>d__15:MoveNext () (at Library/PackageCache/com.unity.visualscripting@1.7.8/Editor/VisualScripting.Core/Platforms/AotPreBuilder.cs:194)
System.Linq.Enumerable/DistinctIterator`1<Unity.VisualScripting.AotStubWriter>:MoveNext ()
Unity.VisualScripting.AotPreBuilder:CreateCodeCompileUnitFromStubWriters (System.Collections.Generic.IEnumerable`1<Unity.VisualScripting.AotStubWriter>) (at Library/PackageCache/com.unity.visualscripting@1.7.8/Editor/VisualScripting.Core/Platforms/AotPreBuilder.cs:326)
Unity.VisualScripting.AotPreBuilder:GenerateCodeAndWriteToStream (System.Collections.Generic.IEnumerable`1<Unity.VisualScripting.AotStubWriter>,System.IO.TextWriter) (at Library/PackageCache/com.unity.visualscripting@1.7.8/Editor/VisualScripting.Core/Platforms/AotPreBuilder.cs:301)
Unity.VisualScripting.AotPreBuilder:FindAndWriteAotStubs (System.IO.TextWriter) (at Library/PackageCache/com.unity.visualscripting@1.7.8/Editor/VisualScripting.Core/Platforms/AotPreBuilder.cs:296)
Unity.VisualScripting.AotPreBuilder:GenerateStubScript (string) (at Library/PackageCache/com.unity.visualscripting@1.7.8/Editor/VisualScripting.Core/Platforms/AotPreBuilder.cs:287)
Unity.VisualScripting.AotPreBuilder:GenerateAotStubs () (at Library/PackageCache/com.unity.visualscripting@1.7.8/Editor/VisualScripting.Core/Platforms/AotPreBuilder.cs:99)
Unity.VisualScripting.AotPreBuilder:OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.visualscripting@1.7.8/Editor/VisualScripting.Core/Platforms/AotPreBuilder.cs:91)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

 

So it looks like it is related to visual scripting. Still no idea how to fix it though.

Sparkett3
Level 4

Okay, I removed the Visual Scripting package from the Package Manager and I'm not getting the error anymore. Again though, that isn't much help if I want to use visual scripting.