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)
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
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Trail Renderer visual doesn't match the positions of vertices when they have been offset
- [Mobile] The Material is not visible when using the Decal Renderer Feature
- Uncaught TypeError: Cannot read properties of undefined is thrown when the tab is inactive for several minutes
- Crash on mono_array_length when building a project
- "StackOverflowException" error when changing spline curve type from "Bezier" to "Auto" in the "Element Inspector"
Add comment