Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Reasons for RenderTexture.Create() to fail?

$
0
0
We're using RenderTextures to dynamically create portraits for characters and save on deployment size, but RenderTexture.Create() has been returning false on some devices and computers, and sometimes for only some of the calls. The documentation doesn't give much in the way of clues for why it might fail and searching/googling hasn't proved much use either. Code snippet showing use: _activeRenderTexture = new RenderTexture(128, 128, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Default); if(_activeRenderTexture == null) { return false; } _activeRenderTexture.name = "something"; _activeRenderTexture.Create(); The texture size is a power of two as well as square. Any ideas of why the Create() call is returning false?

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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