- Home /
Question by
cadellinman · Apr 22, 2015 at 04:25 PM ·
c#getcomponentcomponenthalo
Adjusting size of a halo in C#
Hi there folks.
Currently working on a scene with some streetlights. These lights have two components- a halo component, and a script. I want to use that script to adjust the radius of the halo, so that we have a sort of flickering effect.
Currently going with-
void Update()
{
float FlickRandom = Mathf.PingPong (1f, 2f);
gameObject.GetComponent ("Halo").size = FlickRandom;
}
Although it does not seem to be able to find a definition for 'size'. Is there a different way I need to describe the radius for it?
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Multi similar script Components same game object 1 Answer