Some bundles must be loaded from a remote server, others locally.
I am creating groups and making aa build with the editor script.
Question is, how do I select Load Path to be local for a specific bundle, while the default group has it in remote?
You create an asset group for this content and set the Load Path to Local there. The same content cannot be in more than one asset group.
If you look for a way to package content with the build and still be able to update it via a content update, you might want to take a look at the reply from andymilsom here:
https://discussions.unity.com/t/843007/5
@Peter77 Thank you for a hint. However, It isn’t what I am looking for.
I have 10 scriptable objects: remote build/load path
also
I have 1 scriptable object: local build/load path. (this is content for just-downloaded-game).
10 objects for CDN are perfectly assigned AA group and built with editor script (I do not even touch Addressables UI tab in Editor and I am not allowed to). So the question is how do I specify local build/path for that single scriptable object with code?
You can’t specify it on a per asset level.
You can specify it on a per AssetGroup level only, using the Schema.
The code to set the LoadPath and BuildPath for an AssetGroup looks like this:
var settings = AddressableAssetSettingsDefaultObject.Settings;
AddressableAssetGroup group = // the asset group you want to modify
BundledAssetGroupSchema schema = group.GetSchema<BundledAssetGroupSchema>();
schema.LoadPath.SetVariableByName(settings, "LocalLoadPath");
schema.BuildPath.SetVariableByName(settings, "LocalBuildPath");
Yes, exactly, I meant 10 scriptable objects are assigned groups, so I create the group for each so.
So now I think this is the solution I was looking for, thank you.