Search Unity

WWise and Addressables

Discussion in 'Addressables' started by LarsGameloft, Aug 22, 2019.

  1. LarsGameloft

    LarsGameloft

    Joined:
    Jun 4, 2019
    Posts:
    31
    Hi,
    In our project we use Wwise for audio. Its a separate component that we can use to play sounds. The sounds are loaded from a bank file. Then if there is need of dlc, package files are created and placed in a directory that Wwise can be setup to search for these files. My question is, is there a way to make this work with addressables?
    An Idea I have is to create a list of these pack files and place it in a text asset that can be downloaded using addressables. if there are any missing pack files or updates for wwise then I can extract it from the bundles. Problems:
    -Can I create addressables with non unity files, or any binary file? I tried with bnk files and the bundle is empty.
    -Can I download a bundle file by using the name of the bundle? (instead of triggering it with LoadAssetAsync(key))
    -Can I extract the files from a bundle with unity at runtime to place them in a path?
     
    Last edited: Sep 3, 2019
    tigerleapgorge and orreborre like this.
  2. orreborre

    orreborre

    Joined:
    Feb 18, 2014
    Posts:
    21
    I'm curious, did you find a way to use wwise with addressables?
     
  3. orreborre

    orreborre

    Joined:
    Feb 18, 2014
    Posts:
    21
  4. nmad

    nmad

    Joined:
    Jul 28, 2013
    Posts:
    8
    Did you manage to load wwise banks using addressables @LarsGameloft?
    If so... how did you do it?
     
  5. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    586
    I believe Addressables only works with Unity types. That includes ScriptableObjects. For all other data types, you must place them in StreamingAssets. If you are downloading them from a remote location, use UnityWebRequest.
     
  6. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    Addressables can work with any file type, if you make a custom AssetProvider for it. You can copy the built-in TextDataProvider to get most of the way there but having not done it I am not entirely sure how the build script works with it, since gather dependencies etc. is meaningless for those assets.
     
    tigerleapgorge likes this.
  7. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Addressables is an asset bundle manager, and it doesn't make any sense to use bundles for raw files that aren't accessed via Unity's asset loading system. AFAIK Wwise loads its files directly, so it wouldn't be able to access data from inside a bundle.

    If you want to distribute Wwise files as DLC, just set up your scripts to fetch the files and place them somewhere WWise can load them.
     
    tigerleapgorge likes this.
  8. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    -ish. Addressables uses AssetBundles as its main asset provider, but not as its only asset provider. Remember that its own configuration files and catalogues are downloaded and provided using itself and they are neither Unity assets nor stored in asset bundles, they are vanilla files provided by some protocol, usually HTTP.
     
    tigerleapgorge likes this.
  9. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    You're right, the parts of Addressables that downloads and manages the files have nothing to do with AssetBundles. But Unity itself can only load assets from three sources: scenes, resources, and AssetBundles. The Addressable's high-level APIs deal with assets, not files: you load "asset references", not "file references", so you can only feed assets into the system, not random files that are supposed to be accessed via File.Open().
     
    tigerleapgorge likes this.
  10. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    Yes, but my point is that the Addressables system doesn't limit itself to assets that are in the asset database. You can use it to load arbitrary assets with a suitable AssetProvider, when you do not need the engine itself to load the files, as is the case for stuff generally loaded from StreamingAssets, and/or other arbitrary non-UnityEngine.Object data files. So, yes, I would imagine it is entirely possible to make it load Wwise data files.

    Whether you would want to do that is an entirely unrelated question. :p
     
    tigerleapgorge likes this.
  11. Midiphony-panda

    Midiphony-panda

    Joined:
    Feb 10, 2020
    Posts:
    243