Page 1 of 1

Preparing for Addressables

Posted: Tue Mar 10, 2020 9:22 pm
by VoodooDetective
Hey I was just wondering the best way to prepare for addressables. I was contemplating having both asset bundles and addressables coexist until DSfU supports addressables. DSfU would use the asset bundles, and my code would use addressables.

Does that seem reasonable or will there be changes to AudioWait etc. too? I just want to make the least amount of work for myself in the future.

Re: Preparing for Addressables

Posted: Tue Mar 10, 2020 10:08 pm
by Tony Li
Hi,

Version 2.2.5 should be available on the Asset Store in the next day or two. After that, I'll publish a patch for addressables. As of now, I think you shouldn't have to do anything special except name your addressables with the same name as the asset name. For example, a dialogue entry node in the demo has a sequence like this:
  • Sequence: AudioWait(Private_Hart_1_1)
Currently it loads the audio clip "Private_Hart_1_1" from a Resources folder, although you could move it into an assetbundle without having to change the sequence. (Call DialogueManager.RegisterAssetBundle to let the Dialogue System to know to look in an assetbundle for assets.) So in the meantime you can certainly use assetbundles.

By default, an addressable's name is its full project path. If you change the audio clip's addressable name to just "Private_Hart_1_1", then when addressables support is added the AudioWait() command should continue to work without modification. The hitch I'm working on under the hood is that Addressables.LoadAssetAsync is an async operation, so internally AudioWait() and other sequencer commands will need to be able to wait for the load to finish.

Re: Preparing for Addressables

Posted: Tue Mar 10, 2020 10:15 pm
by VoodooDetective
Ahhh ok that makes good sense. Cool! Well then in the meantime I'll make use of both asset bundles and addressables. Thanks so much for the detailed information!

Is there a place where patch updates are posted?


Oh also, how will addressable groups be handled? Or maybe that doesn't factor into the address. I'm still new to them.

Re: Preparing for Addressables

Posted: Wed Mar 11, 2020 9:05 am
by Tony Li
Patches are normally posted to the Dialogue System Extras page. However, it's looking like this will touch so many Dialogue System internals that it won't be feasible to make a public patch. I'll probably put it on the private customer download page, which you can get access to by PMing me your Asset Store invoice number.

The DS integration probably won't do anything special with addressable groups. You can certainly use them, however, to preload a group of addressables (for example, pulling them down from a remote server). For example, you could define a group for each scene containing all of the voiceover audio used in that scene. Then you can load the group so the individual addressable audio clips are ready to be used without DS having to download them one-by-one as needed. If your addressables are going to be stored locally alongside your build, then there's probably not much advantage to groups in this regard.

Re: Preparing for Addressables

Posted: Wed Mar 11, 2020 10:08 pm
by VoodooDetective
Ahh ok thanks! That all makes a lot of sense. I'll PM you my invoice number.

Re: Preparing for Addressables

Posted: Wed Mar 25, 2020 3:11 pm
by VoodooDetective
Sorry, quick other question (probably a dumb one), will the AnimatorController command work with addressables too in the patch? Is there still plans for the patch? Sorry to be a pest :(. I just wanted to make sure since i'm coding assuming it'll be possible in the future.

Re: Preparing for Addressables

Posted: Wed Mar 25, 2020 4:00 pm
by Tony Li
Hi,

I'm catching up on a few tasks that have delayed the addressables patch, but it's still in the works.

Yes, the AnimatorController() sequencer command should work. Anywhere the Dialogue System can currently read from Resources or assetbundles, it should be able to read from addressables without any changes.