Addressable Manager is a Wrapper Package, that makes it easier to use, handle and manage the addressable.
We simplify addressable usage to just this
AssetReference<GameObject> reference;
var prefab = await reference.LoadAssetAsync();
// or
var prefab = await reference.LoadAssetAsync(true); //allows to use editor asset when on editor
This package support AssetRefernce for GameObject, MonoBehaviour and Scene.
Use AssetReference<T>
this is quite general for all asset, usually for GameObject and ScriptableObject
AssetReference<GameObject> reference;
var prefab = await reference.LoadAssetAsync();
// or
var prefab = await reference.LoadAssetAsync(true);
Use AssetReferencePrefab<T>
this part allows you to load component in a prefab derriven from MonoBehavior, instead of using gameobject
AssetReferencePrefab<CustomClass> componentRef;
CustomClass prefab = await componentRef.LoadPrefab();
Use AssetReferenceScene
this specifically for scene, and you can use load and unload scene
AssetReferenceScene sceneRef;
if (isUnloadScene)
{
await sceneRef.UnloadSceneAsync();
}
else
{
await sceneRef.LoadSceneAsync(LoadSceneMode.Additive);
}
for scene, you may want to preload your scene in advance, you can do it like this for preload