Search Unity

Custom build?

Discussion in 'Addressables' started by Wawro01, Sep 6, 2019.

  1. Wawro01

    Wawro01

    Joined:
    Apr 23, 2014
    Posts:
    44
    Hey guys

    I have structure of groups which basically corresponds with my project structure. Like
    Code (CSharp):
    1. Assets-CarModels
    2. Assets-Buildings
    3. Assets-Enviroment
    4. Levels
    Advantage is when 3d artist add new car to folder , I can easily add it to proper group as well.
    Problem whit this is that I want to separate those assets to two parts, one will be local in buil and second on cdn downloaded later. I can create groups like that

    Code (CSharp):
    1. Assets-CarModels
    2. Assets-Buildings
    3. Assets-Enviroment
    4. Levels
    5. Tutorial-Assets-CarModels
    6. Tutorial-Assets-Buildings
    7. Tutorial-Assets-Enviroment
    8. Tutorial-Levels
    or I can crate custom build and custom schema that would leave first group structure and decide if Addressable asset is local or remote by it's tag. Is this possible?

    Thanks
     
  2. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    Because you can only specify where to load a bundle (remote/local) by it's group schema, you have to use different groups for tutorial and remote assets. Depends on how you decide where the assets belongs to (manually, by address, by folder...), you can write an editor helper script to move the assets around to the right group. The importer may help.
     
  3. HugoClip

    HugoClip

    Joined:
    Feb 28, 2018
    Posts:
    52
    Favo-Yang likes this.
  4. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    @HugoClip's approach also works (thanks for sharing the link). However to solve your specific problem it seems a bit over-engineering, but your call.
     
  5. HugoClip

    HugoClip

    Joined:
    Feb 28, 2018
    Posts:
    52
    @Favo-Yang is right, if the only thing you require is different groups, remove and local I would just do it manually or use the importer.