goback add

unity3d屏幕截图功能

3971 点击·0 回帖
灯火互联
楼主


[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图片被存在了当前工程的子目录下了。


喜欢0 评分0