add Light

 myLight.AddComponent ("Light");

add Camera

myCamera.AddComponent ("Camera");

add GUI Layer

myCamera.AddComponent ("GUILayer");

add AudioListener

myCamera.AddComponent ("AudioListener");

add script

m_Targets.AddComponent("<script name>");

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.  // ;
					        lightGameObjecteffect.transform.position = new Vector3(30, 30, -9);		

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

Leave a Reply