Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Loading Texture to Memory on Smartphones Question

Discussion in 'Scripting' started by zee_ola05, Nov 18, 2017.

  1. zee_ola05

    zee_ola05

    Joined:
    Feb 2, 2014
    Posts:
    166
    In smartphones (e.g. iPhone 6), does loading a texture to memory effectively loads it to GPU as well, since the memory is shared between CPU and GPU?

    Reason for asking, I want to understand why my game stutters when the camera first sees my Sprite/Texture. The texture should already have been loaded to memory when the game object was instantiated. I read somewhere that it is because the texture is being loaded to GPU. But if phones have shared memory between CPU and GPU, it wouldn't make sense.
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    Have you tried using the Unity Profiler already, to figure out where the cost comes from? The Profiler should exactly show where the cost is being spent, which causes the stutter.

    Learn how to diagnose common performance problems and optimize your projects:
    https://unity3d.com/de/learn/tutorials/topics/performance-optimization