- Home /
Light, halo and color
I have a prefab that is, maritime navigation lights. It has a Java script that says:
var thisColor: Color;
function Awake (){
light.color = thisColor;
}
Each light's color is then selected from the Inspector. It works well but the problem is that, it should have a halo since 'Draw Halo' is selected but that doesn't appear. It does if that line is missing. It does it too if the line is, for example:
light.color = Color.red;
Strange, isn't it? Is it a bug?
Okay, I solved it by writing: light.color = Color(thisColor.r,thisColor.g,thisColor.b,1); I still don't know why it works better but ... I am happy! ;-)
Answer by Michel Verheughe · Sep 01, 2013 at 06:53 AM
Okay, I solved it by writing:
light.color = Color(thisColor.r,thisColor.g,thisColor.b,1);
I still don't know why it works better but ... I am happy! ;-)
Your answer
Follow this Question
Related Questions
Making an object glow using texture. 1 Answer
Change light color when entering trigger 1 Answer
Change Fog Color Smoothly 1 Answer
Change Halo Color with Code 1 Answer