Download the Addressables plugin
Open Addressables Groups group settings
Create groups
set path
Create a new cube test, drag it to the resource folder as a prefab, and then drag it into the RemoteGroup.
Set mode
Open the package
Find the following folder, the files in the folder are established files
Create a new script and add a code test.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
public class DataTest1 : MonoBehaviour
{
void Start()
{
Addressables.LoadAssetAsync<GameObject>("Assets/Prefabs/Cube.prefab").Completed += (handle) =>
{
GameObject prefabobj = handle.Result;
GameObject cube = Instantiate(prefabobj);
};
}
// Update is called once per frame
void Update()
{
}
}
Note that the path "Assets/Prefabs/Cube.prefab" is the path of the prefab.
Open the network file server, here I use HFS, drag the file and parent folder just generated into
Back to unity, set the loading and creation path of RemoteGroup.
Delete the cube prefab and test it.