Search Issue Tracker

By Design

Votes

0

Found in

5.6.1f1

Issue ID

920611

Regression

No

Runtime-created textures do one pointless texture data upload (problem for Google’s apps)

Graphics - General

-

For textures that are created at runtime from scripts, it seems that at the texture constructor time the data (which does not even exist yet!) is uploaded to the GPU immediately. Later on the user sets actual data (via SetPixels or whatever), and then the actually relevant upload happens. This is a performance problem, especially for mobile apps that create a lot of dynamic textures on startup. Maybe some flag to the scripting API could be done at least, to avoid this “pointless upload”?

Steps to reproduce:

1) Download attached project and open in Unity
2) Open scene 'Scene'
3) Enable Profiler
4) Press Play and observe performance(after runtime textures being created (check 'TextureTest.cs' script))

Reproduced with:
5.5.4p1, 5.6.2p1, 2017.1.0f1, 2017.2.0b1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.