using UnityEngine;
using System.Collections;
public class switchlight : MonoBehaviour {
public GameObject mySwich;
public Light mylight;
public GameObject EmSourse;
public Color LightColour;
private float EmStregh;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
EmStregh = 30.0F;
EmSourse.GetComponent<Renderer> ().material.color = LightColour;
EmSourse.GetComponent<Renderer> ().material.SetColor("_EmissionColor", LightColour * EmStregh);
mylight.light.color = new Color(LightColour);
mySwich.transform.Rotate (new Vector3(0,2,0));
}
}
Problem with this part
mylight.light.color = new Color(LightColour);
“color” word is red and i get an error
“dose not contain constructor that takes ‘1’ arguments”
mylight.light.color = new Color(LightColour);
What am i dooing wrong here? Thank You!