一、前言 二、保存图片到相册 修改File->BuildSettings->PlaySettings->OtherSettings写入权限 图片设置 将贴图转化成字节数组时报错,不支持Texture2D压缩格式 传入目标贴图,返回的图片即可转成字节数组啦 public Texture2D DeCompress(Texture2D source) { RenderTexture renderTex = RenderTexture.GetTemporary( source.width, source.height, 0, RenderTextureFormat.Default, RenderTextureReadWrite.Linear); Graphics.Blit(source, renderTex); RenderTexture previous = RenderTexture.active; RenderTexture.active = renderTex; Texture2D readableText = new Texture2D(source.width,...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with OnSaveImages
Contact OnSaveImages, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack