Unity Texture2D转Sprite 发表于 2022-03-28 更新于 2022-03-31 阅读次数: 本文字数: 225 阅读时长 ≈ 1 分钟 1234Texture2D texture = ScreenCapture.CaptureScreenshotAsTexture();//Unity截屏Sprite pic = Sprite.Create(texture, new Rect(0, 0, Screen.width, Screen.height), new Vector2(0.5f, 0.5f));image.sprite = pic;// image.SetNativeSize();设置image自适应Sprite 本文作者: 小菜鸟 本文链接: https://kdt-g.github.io/2022/03/28/Unity Texture2D转Sprite/ 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!