Installation in the package manager Addressable
import a model, labeled Addressable resources
open Addressable Profiles window
to create a configuration
changes the remote server address for the address of the server
open Addressable Groups window
configuration item to switch to Aliyun just added
to establish a group
here renamed Remote group
right of the group, select Inspect group settings
to Build Path and Load Path set RemoteBuildPath and RemoteLoadPath
If you want the resource file after the group packaged separately, you can set up the inspection panel of the group Bundle Mode for the Pack Separately
clicks Inspector panel Inspect Top Level Settings, the Build Remote Catalog check, and then the Build Path and Load Path to RemoteBuildPath and RemoteLoadPath
back Addressables groups window, just drag the Remote group's model group
will switch to third Player Mode Script
begin compiling resources
after compilation, the project file will add a folder that just Build Path settings file folder
select mode repackage packaged separately, the resources of the group in a folder (remotegroup_assets_assets) in
the upload ServerData \ StandaloneWindows all the files in the server
programming, load a resource in the game is running
public class GameManager : MonoBehaviour
{
public AssetReference asset;
void Start()
{
asset.InstantiateAsync();
}
}
Select the model you just mark
into the game, Addressable Asset system will automatically check if there is the latest version of the model locally, if there is no local or an old version of the model will download the model, after the download has finished loading into the scene.
Just change my resources, uploaded to the server and then re Build to test whether the client can update normal
and then back Addressable Groups window, click the Build-Update a Previous Build
then pop up a file selection box, select the project folder \ Library \ com.unity.addressables \ StreamingAssetsCopy \ Windows in addressables_content_state.bin file
after recompiling, updates to the server, and then open the game, you can see that resources are properly re-download.
Start a discussion, please have criticized the correction.
This article only spoke of the allocation of resources remotely hosted process, specific instructions on the look Addressable Addressable official documents.
reference:
- tomcat: http://tomcat.apache.org/
- Addressable 1.3 version of the document https://docs.unity3d.com/Packages/[email protected]/manual/index.html