Skip to content

Setting buildPath and runtimeLoadPath from script #22

@pdinklag

Description

@pdinklag

ExternalCatalogSetup has had its buildPath and runtimeLoadPath values be changed in type. This will result in empty values on your external catalog objects upon upgrading, and content builds failing. The types have been updated to work with Addressables' ProfileValueReference framework. This allows to work with the built-in string evaluation functions and profile-defined variables in a more transparent way as it also properly previews the result in the inspector window.

Could you give a small description as to how I'd set these from a script now?

I used to do this:

var catalog = CreateInstance<ExternalCatalogSetup>();
catalog.CatalogName = bundle.name;

catalog.BuildPath = BundlesBuildPath + "/" + bundle.name;
catalog.RuntimeLoadPath = RuntimeLoadPath;
catalog.AssetGroups = groupList;
catalogs.Add(catalog);

If I have an external catalog asset, I can select <custom> in the inspector and set some value. How would I do that from script? Creating a dummy external catalog asset and borrowing the profile value references from there also does not seem to do the trick. (this does work, but apparently I'm running into #21 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions