keijiro / KlakSpout

Spout plugin for Unity
The Unlicense
651 stars 97 forks source link

Blit Shader is null post-build #90

Closed LawrenceSelly closed 2 years ago

LawrenceSelly commented 2 years ago

I'm using the KlakSpout v2.0.3, and it's installed via Scoped Registries, alongside Klak NDI.

Unity Version 2020.3.33f1 Target: Windows x64

I'm receieving the following error when I build my project: NullReferenceException: Object reference not set to an instance of an object at Klak.Spout.Blitter.GetMaterial (Klak.Spout.SpoutResources resrc) [0x00011] in F:\1_Unity_Projects\Toolkit Workpsace\Library\PackageCache\jp.keijiro.klak.spout@2.0.3\Runtime\Internal\Utility.cs:45 at Klak.Spout.Blitter.Blit (Klak.Spout.SpoutResources resrc, UnityEngine.Texture src, UnityEngine.RenderTexture dst, System.Boolean alpha) [0x00000] in F:\1_Unity_Projects\Toolkit Workpsace\Library\PackageCache\jp.keijiro.klak.spout@2.0.3\Runtime\Internal\Utility.cs:25 at Klak.Spout.SpoutSender.Update () [0x00099] in F:\1_Unity_Projects\Toolkit Workpsace\Library\PackageCache\jp.keijiro.klak.spout@2.0.3\Runtime\SpoutSender.cs:112

I've added the Spout Blit shader to the Built In Shader's section, which I thought was the fix when similar errors have occured before, however it still doesn't function.

image

Is there something I'm missing? did something not install correctly?

keijiro commented 2 years ago

You have to give SpoutResources to the component. Please check the "Scripting interface" section in README.