Bryan Anthony Garcia Bryan Anthony Garcia - 1 year ago 184
C# Question

How can I change the value of 'Draw Halo' inside Point Light - Unity3D

I can't seem to find a Draw Halo property in the intellisense. Is there a way to set its value programmatically? Thanks!

Answer Source

Halo is a separate component.

To add a halo to a light: AddComponent<Halo>()

To access the halo attached to a light: GetComponent<Halo>()

The "Draw Halo" checkbox in the inspector is a bit of a red herring -- it creates a Halo component which is then hidden from the hierarchy view, which is boneheaded but it's preserved from older versions of Unity.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download