By Raymund
on Wed, 02/27/2013 - 07:53
Hi there,
Does anybody knows how to create guibutton switch for multiple lights in C# with out destroying it when loading a new scene. For example, I have 1 GUI button which could be the switch that can be a toggle for on/off the lights. If I have 5 point lights in the scene, and 1 gui button that can control at once. And I also found some issue when using imagetargets all the lights are destroyed after the scene was reloaded. And right now I'm using an ipad 3 for testing. Can anyone help me with my problem. Any thing will do, I just want to use for my simple AR project. Javascript or C# would be fine. Thanks.
How to turn on/off multiple lights using GUI buttons in C# with
Hi Raymund,
From your post it is not quite clear what the problem is.
How to turn on/off multiple lights using GUI buttons in C# with
Hi Nalin,
How to turn on/off multiple lights using GUI buttons in C# with
but it's not really working
What isn't working? What exactly is the problem?
N
How to turn on/off multiple lights using GUI buttons in C# with
Hi Nalin,
How to turn on/off multiple lights using GUI buttons in C# with
Don't add your GUI script to a Vuforia prefab instance. Those are reinstantiated for each scene. Add it to a GameObject at the top level of your Hierarchy and use DontDestroyOnLoad.
How to turn on/off multiple lights using GUI buttons in C# with
Hi David,