Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question How can I remove textures that I am not using at the scenes in build?

Discussion in 'Editor & General Support' started by kardok, Feb 17, 2023.

  1. kardok

    kardok

    Joined:
    Mar 11, 2018
    Posts:
    46
    Hi, I got 2 different game projects at 1 project on Unity. One of them is a 3D game with quality models and other is 2D game with simple pixel arts. But when I only build 2D scene it even adds 3D game assets so textures are getting to much space. How can I fix this? I only want the texture of the models I am using to be at build file.

    Here is my build report about sizes:
    Textures 1.1 gb 86.0%
    Meshes 15.4 mb 1.1%
    Animations 160.0 mb 11.9%
    Sounds 7.9 mb 0.6%
    Shaders 3.2 mb 0.2%
    Other Assets 2.4 mb 0.2%
    Levels 0.0 kb 0.0%
    Scripts 247.4 kb 0.0%
    Included DLLs 0.0 kb 0.0%
    File headers 195.3 kb 0.0%
    Total User Assets 1.3 gb 100.0%
    Complete build size 1.4 gb
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,571
    There's at least ten billion different "reduce my build size" videos and tutorials and blogs out there. Work through the first three that google suggests for you.

    Only assets that are referred to in scenes / prefabs are included, PLUS all assets in folders beginning with Resources/

    From there you can look at the build report to track down where you have stuff referred to.
     
    kardok likes this.
  3. kardok

    kardok

    Joined:
    Mar 11, 2018
    Posts:
    46
    Thanks a lot Kurt-Dekker. I tried to google it but couldn't figure the right words.
     
    Kurt-Dekker likes this.