0
点赞
收藏
分享

微信扫一扫

Unity内屏幕截图

飞进科技 2022-04-29 阅读 111
Unity

Unity内屏幕截图

一、

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Screen : MonoBehaviour {

    private int screenIndex = 0;
	
	// Update is called once per frame
	void Update () {
        if (Input.GetKeyDown(KeyCode.P))
        {
            screenIndex++;
            ScreenCapture.CaptureScreenshot("截图.png");
            Debug.Log("截图成功:" + screenIndex);
        }
	}
}

举报

相关推荐

0 条评论