标签:style blog io color ar os sp div on
void Start(){ Rect screenRect = new Rect(0, 0, Screen.width, Screen.Height); } void Update{ Vector3 screenPos = targetCamera.WorldToScreenPoint(objTrans.position); if(!screenRect.Contains(screenPos)){ //do what you want Debug.log("Obj has gone out of screen..."); } }
标签:style blog io color ar os sp div on
原文地址:http://www.cnblogs.com/waterdragon/p/4088949.html