add and setup light


GameObject  lightGameObjecteffect = new GameObject("The Light");
					        lightGameObjecteffect.AddComponent<Light> ();
							lightGameObjecteffect.light.type= LightType.Spot;
					        lightGameObjecteffect.light.color = t_color; // Color.  // Color.  //Color.red ;
							lightGameObjecteffect.light.range=200;
					        lightGameObjecteffect.transform.position = new Vector3(30, 30, -9);		
							lightGameObjecteffect.light.spotAngle=36;

By admin-powenko

Dr. Powen Ko is a teacher and CEO on LoopTek LLC, and like to teaching. if you need to class, please let PowenKo know, he will love to service and sharing. LoopTek web site is www.looptek.com

Leave a Reply