- Home /
Question by
unityventures13 · Apr 20 at 01:05 PM ·
c#assetbundlepackagecustom editoraddress
How to edit AssetBundleProviderType by code
I'm writing a custom editor to alternate an addressable group between local and remote.
I can change the BuildPath
and the remote Path like this:
BundledAssetGroupSchema schema;
schema.BuildPath.SetVariableByName(settings, "RemoteBuildPath");
schema.LoadPath.SetVariableByName(settings, "RemoteLoadPath");
but I also need to change the AssetBundleProvider
to a custom Provider
.
I was trying to do it like this:
SerializedType schemaBundledAssetProviderType = schema.BundledAssetProviderType;
schemaBundledAssetProviderType.Value = typeof(MyCustomProvider);
But since BundledAssetProviderType
is a SerializedType
wich is a struct
, when i change the Value
property it only modifies a copy stored in the schemaBundledAssetProviderType
variable.
Is there a way modify the reference inside the schema?
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Addressables System - Assetreference Equality 0 Answers
Arrays with zero length 1 Answer