My goal is to be able to change a setting and quickly build a Demo version of my game. Hypothetically, this would just be the same game, except all the levels are missing except one, and the game will automatically handle this situation and go into Demo mode.
Looks like Build Profiles just point to an entirely different asset folder so I’d have to duplicate everything, including code, which I definitely don’t want to do. I thought I could just change the addressable reference to the Levels folder to be a “DemoLevels” folder instead, which just contains the one level.
Is this the sort of thing Addressables will help me do?
It’s something Addressables can definitely help you out with.
If, for example, your demo just needs to contain a single level, put your levels each in a different group, either per level, or in a group for demo levels, and one for release levels.
When building the demo, just untick the box for ‘Include in Build’ for the group(s) of the levels that belong to the full game. Then they won’t be included in the full build.
To make the game automatically react to it, to the availability of levels in-game, associate each level with a data object and give them a label in the Addressables window. At runtime, load all these data objects with this label and check their count, or infer from their data whether all the levels are available or not.
1 Like
Thank you very much, that makes sense. So is there a way to have “Include in Build” ticked/unticked automatically for different profiles? Or do I need to make my own Build script to do this? (If not, what exactly do profiles do then??)
There’s no way to perform this using build profiles. You’ll have to adjust these values using a custom build script (as far as I’m aware).
Build profiles are mainly used to determine where your bundle files are located at build time, and during runtime (where the game expects the files to be loaded from).
That clears that up, thank you very much 