Unity-Plugins icon indicating copy to clipboard operation
Unity-Plugins copied to clipboard

Duplicated Spout Gameobject is created. causes Editor crash

Open sloopidoopi opened this issue 10 years ago • 1 comments

There is some little bug when you open the Unity demo and you click onto a Spoutreceiver without ever let the scene go into play mode. Even if there is already a Spout Gameobject(Spout2 component attached) a new Sout2 Instance is created. I changed the Init(bool debug) Method at the bottom with an additional check to circumvent this problem :

if(FindObjectsOfType<Spout2>().Length <=0){

        spoutObject = new GameObject("Spout");

        spoutObject.AddComponent<Spout2>();
        }

sloopidoopi avatar Jan 23 '15 20:01 sloopidoopi

Thanks for that, i added this fix.

benkuper avatar Feb 03 '15 23:02 benkuper