public var isRendering:boolean=false;private var lastTime:float=0;private var curtTime:float=0;function Update(){isRendering=curtTime!=lastTime?true:false;lastTime=curtTime;}function OnWillRenderObject(){curtTime=Time.time;}
本文复制自:http://blog.csdn.net/we000636/article/details/7407207