How to animate Halo

Hi,
I want to creating a “breathing” glow affect around a prefab. To achieve this I add the Halo component, my question is how can I create a loop animation that will shrink and grow the Halo size to get the breathing effect.
TIA!

See if it works for you. Very simple code but efficient.

function Update(){
transform.light.intensity = Mathf.Abs(Mathf.Sin(Time.time));
}

Hey rvdb86,

Why not actually animate it? Unity lets you animate almost all aspects of an object, so go ahead and animate the size- or any other aspect of it.

Hope this helps! -Gibson

A very neat solution is making a linear animation and using gameObject.SampleAnimation to give the desired value to the halo sIze.