Search Unity

Materials vs Textures in Asset Bundle

Discussion in 'Asset Bundles' started by Mullan7, Jul 17, 2019.

  1. Mullan7

    Mullan7

    Joined:
    May 23, 2013
    Posts:
    79
    Does it make much difference if I include a material in an asset bundle with the textures or just include the textures and make the material at runtime?

    I'm using LWRP, and these materials are using the lit shader. What I'm asking is will updates to LWRP cause any issues with the materials reference to that shader? For example if they change parameters in the shader.

    I need to be able to update Unity/LWRP without ever rebuilding the bundles
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,619
    I would create separate bundles for materials and textures.

    The reason for this being, that textures often consume a lot of space, but change relatively seldom. Materials get tweaked more often in my experience and if these two asset types have been separated, if you rebuild bundles, Unity won't repack the huge texture bundles again due to its incremental build system.

    Which results in faster build times and fewer bundles to deploy in an update.
     
    Mullan7 likes this.