// Use this for initialization void Start() { rectTransform = contentText.GetComponent <RectTransform>(); planetSwitchScript = gameObject.AddComponent <PlanetSwitch>(); planetSwitchScript.SunLight = GameObject.Find("SunLight").GetComponent <Light>(); }
// Use this for initialization void Start() { rectTransform = contentText.GetComponent<RectTransform>(); planetSwitchScript = gameObject.AddComponent<PlanetSwitch>(); planetSwitchScript.SunLight = GameObject.Find("SunLight").GetComponent<Light>(); }