Forum rules - please read before posting.

Using Asset Bundles instead of the Resources folder for non-speech content

Hi,

I'm porting my game to a console and one of the requirements is that we make use of Asset Bundles instead of the Resources folder to load data. I know AC has the option of using Asset Bundles instead of the Resources folder for speech audio files, but are there options to do this for other content? I have a lot of materials and prefabs in my Resources folder that are stored when using Remember components like Remember Material and Remember Transform with Save Scene Presence enabled. Does anyone know how I would go about telling AC to load my materials and prefabs from an Asset Bundle instead of the Resources folder?

Thanks!

Comments

  • edited December 2020

    Is that a strict requirement? AC does allow for the placement of such objects in "SaveableData" Resources subfolders for better performance - see the Manual's "Performance and optimisation" chapter for details.

    Otherwise, how many of these assets can be simplified? I recommend avoiding use of the "Save scene presence?" option in favour of simply hiding a given object from view - unless you have specific needs to.

    You can also often rely on Animation to swap out an object's appearance instead of swapping materials out. If you can share details on how specifically you're needing to use Resources assets, it might be possible to detail more ways in which their usage can be reduced.

    Remember components are all independent, so it would be possible to replace e.g. "Remember Material" with a custom one that doesn't rely on Resources. This could even be done by exposing the various possible materials in the Inspector, so that it has a direct link to the material assets it has to work with.

    IIRC Asset Bundles are being sidelined by Unity in favour of Addressables - which AC also supports for with speech audio. I'd recommend looking into Addressables instead of Asset Bundles.

  • Thanks for the tips, Chris! I'll give them a try.

    It's not a strict requirement, but is very much frowned upon to use the Resources folder as one of the things we have to keep down is how many times data is read/written to disk per minute in order to have our game approved.

    I'm also storing audio files for footsteps SFX that rely on the Remember Footsteps component and I also have some audio objects using the Remember Sound component to remember the playback state. If you have any additional tips to get these out of the Resources folder that would be appreciated.

  • edited December 2020

    Thanks for the clarification.

    Remember Footstep Sounds and Remember Sound will both search Resources upon loading a save file, or opening a scene with them present. However, both of these do work independently from the data they actually save.

    You could, for example, replace Remember Footstep Sounds with a custom Remember script that retrieved audio using addressables, for example.

    I'll have a look to see if such an option can be provided built-in - or at least in the form of a script on the wiki.

  • Thanks, Chris :)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.