纳金网
标题:
Unity截屏的代码
[打印本页]
作者:
狂风大尉
时间:
2014-7-31 19:12
标题:
Unity截屏的代码
IEnumerator Photo()
{
int m_width = (int)Screen.width;
int m_height = (int)Screen.height;
yield return new WaitForEndOfFrame();
cutImage = new Texture2D (m_width, m_height,TextureFormat.RGB24, false);
cutImage.ReadPixels(new Rect(0,0,m_width, m_height),0,0, true);
cutImage.Apply();
byte[] byt = cutImage.EncodeToPNG();
}
复制代码
作者:
我不再年轻
时间:
2014-7-31 19:19
很实用, 多谢!
作者:
hyui
时间:
2014-7-31 20:16
Thanks for sharing !
欢迎光临 纳金网 (http://rs.narkii.com/club/)
Powered by Discuz! X2.5