Quantcast
Viewing latest article 2
Browse Latest Browse All 271

Resize texture from prefab?

Hello community, I am trying to obtain icons from prefabs by using AssetPreview.GetAssetPreview. It works, but the default size for the newly generated images is 128x128. code: rawIcon = AssetPreview.GetAssetPreview(target); icon = rawIcon as Texture2D; byte[] bytes = icon.EncodeToPNG(); Is there away to get larger images? I tried resizing the resulting texture after using AssetPreview.GetAssetPreview, but the pictures are blank: icon.Resize(512,512); Thank you

Viewing latest article 2
Browse Latest Browse All 271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>