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 ,