- Home /
remove this post
remove this post
you can make it with animations make an animation for your light select intensity or color and then you can play with it and set it to loop. :D
Answer by getyour411 · May 15, 2014 at 01:12 AM
http://forum.unity3d.com/threads/4988-Flickering-Light
Please search for similar questions/answers, tuts, vids, code snippets, etc
Answer by Cherno · May 15, 2014 at 01:15 AM
var myLight : GameObject;
var t : float;
var threshold : float = 0.5f;
function Update() {
t += Time.deltaTime;
if(t >= threshold) {
t = 0.0f;
if(myLight.enabled == true) {
myLight.GetComponent(Light).enabled = false;
}
else {
myLight.GetComponent(Light).enabled = true;
}
}
}
You can also change the light.intensity instead.
Answer by Jeff-Kesselman · Jun 02, 2014 at 11:31 PM
There are also parameters to do it automatically with particle systems
Your answer
Follow this Question
Related Questions
Turn all game lights off after a collision 1 Answer
How can i make the game area pitch black 2 Answers
How to hide a sprite when they are in shadow using Unity 2D Light System? 2 Answers
Lighting differences between scenes in Player but not in Editor 2 Answers
Light is too dark on 3D models 3 Answers