Answer the question
In order to leave comments, you need to log in
Error when trying to change the color of Light2D. What to do?
void Awake()
{
Light2D light = transform.GetComponent<Light2D>();
Color prettyColor = new Color (255, 255, 255);
light.color=prettyColor;
}
light.color=prettyColor;
(NullReferenceException: Object reference not set to an instance of an object Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question