当前位置:操作系统 > 安卓/Android >>

unity3d屏幕截图功能

[java] 
function OnGUI(){ 
   if(GUI.Button(Rect(Screen.width*0.5-50,Screen.height*0.5-50,100,100),"screen")){ 
       Application.CaptureScreenshot("Screenshot.png"); 
   } 

function OnGUI(){
   if(GUI.Button(Rect(Screen.width*0.5-50,Screen.height*0.5-50,100,100),"screen")){
       Application.CaptureScreenshot("Screenshot.png");
   }
}

 

这张Screenshot.png图片被存在了当前工程的子目录下了。

 

作者:dlnuchunge
补充:移动开发 , Android ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,