Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Optimize textures in a scene

Discussion in 'Scripting' started by jjuam, Mar 11, 2016.

  1. jjuam

    jjuam

    Joined:
    Jun 12, 2015
    Posts:
    51
    Hi everybody!!

    I have a scene in my game that contents many gameobjects, each of them has 4 textures, and for this reason the game doesnt´n work proporly in mobile. GameObjects are out of the camera vision, and only apears in the scene if we touch a button, I mean, we can switch the gameobjects in the scene pressing a button. I was wondering if it´s posible to optimize this textures while they aren´t in the scene. How can I do that??

    Thanks a lot in advence!!
     
  2. ShokeR0

    ShokeR0

    Joined:
    Feb 24, 2016
    Posts:
    112
    To make it clear, do you have issues with running your game on mobile because the textures takes too much memory?
     
  3. Teravisor

    Teravisor

    Joined:
    Dec 29, 2014
    Posts:
    654
    What exactly is problem? Memory footprint? Too much CPU load? Too much GPU load?
    If memory footprint, you'll have to place textures into Resources/AssetBundle and manually load/unload them, compress them and maybe reduce their quality further.
    If CPU load you would need to manually disable unseen objects.
    If GPU load you would need to compress textures, maybe reduce their quality, and, in best way, reduce amount of textures.

    Ask profiler what's your problem. You can profile on android, that I know for sure.
     
  4. jjuam

    jjuam

    Joined:
    Jun 12, 2015
    Posts:
    51
    Many thanks for the replies!!
    Looking on Android I think it´s memory and CPU fails. I´ll try what you say.
    Thanks!!