Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
YankiAkademi's avatar
YankiAkademi
Honored Guest
4 years ago

How Can I Make a Button as Turn ON/OFF the Directional Light with C# in Unity.

Hey.

Currently, I'm making a simple vr game in unity. But i dont know how can i make input for Turn ON/OFF the lights with C# or another way.

For example: when i press the A Button on my Oculus Controller, i want to the lights go turn on and when i press again the lights go turn off.

Can you help me?

Thanks...