Article directory
Simulate remote publishing of resources
1. Simulate this machine as a resource server and use Unity’s own tools or third-party tools
-
Using addresable hosting
Remember to use 192.168.3.83 and 58474 ports
-
Set addressable profile
2. Set the group as the remote loading path
-
Specify the group to use remote loading
-
Remember to check Build Remote Catalog
3. Packing
There are file directories and bundles
4. Test
-
Loaded AB package
-
code
void Start() { print("开始加载。。。"); Addressables.LoadAssetsAsync<GameObject>(new List<string>() { "Cube", "SD" }, (obj) => { var newObj = Instantiate(obj); newObj.transform.position = new Vector3(0, 0, 0); }, Addressables.MergeMode.Intersection); }
-
Build the application and test it
Successfully loaded the AB package resources of the simulation server
Actual remote publishing of resources
The video uses Windows server + hfs.exe
My server is Linux, so I will skip the steps in the video.
I use Linux server + Pagoda panel to operate
-
server information
For the website built using typecho, the open port is 80. (This step requires online search)
-
The process of loading AB package by remote server
-
Unity packaging
-
Upload the packaged files to the server website directory
You can use the web page to access the .json file to see if it can be accessed.
-
Run the program in Unity to load the AB package from the remote server
-