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

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:
    37,194
    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.