|
|
| (同じ利用者による、間の60版が非表示) |
| 1行目: |
1行目: |
| ==Addressableとは==
| | [[Unity/Addressable/基本]] |
| 外部サーバーで使えるResources
| |
|
| |
|
| ==インストール==
| | [[Unity/Addressable/複数ロード]] |
| #Unityメインメニュー/Window/Package Manager/Unity Registryが選択"addressable"を検索
| |
| #Addressablesをinstall
| |
|
| |
|
| ==Addressableの作り方==
| | [[Unity/Addressable/画像ロード]] |
| #適当にプレハブをAssetsの下につくる。
| |
| #inspectorにaddressableのチェックがあるので、チェックを付ける
| |
| #チェックをつけると、addressableのpathが生成される(例:Assets/ButtonGroup.prefab)
| |
| #作られたファイルをResources以外のdirに入れる。(例:Resources_addressable)
| |
| #以下SampleScene.csをシーンに連携する
| |
|
| |
|
| <pre>
| | [[Unity/Addressable/LoadResourceLocationsAsync]] |
| using System.Collections;
| |
| using UnityEngine;
| |
| using UnityEngine.AddressableAssets;
| |
| using UnityEngine.ResourceManagement.AsyncOperations;
| |
| public class SampleScene : MonoBehaviour
| |
| {
| |
| void Start()
| |
| {
| |
| StartCoroutine(Load());
| |
| }
| |
| IEnumerator Load()
| |
| {
| |
| var handle = Addressables.LoadAssetAsync<GameObject>("ButtonGroup");
| |
| yield return handle;
| |
| if (handle.Status == AsyncOperationStatus.Succeeded)
| |
| {
| |
| var instance = Instantiate(handle.Result);
| |
| }
| |
| }
| |
| }
| |
| </pre>
| |
|
| |
|
| | [[Unity/Addressable/ローカルサーバー]] |
|
| |
|
| ==Addressableの削除==
| | [[Unity/Addressable/シーンロード]] |
| #Window/Asset Management/Addressables/Groups
| |
| #Build/CleanBuild/AllとContent BuildersとBuild Pipeline Cache
| |
|
| |
|
| ==Addressableの再生成==
| | [[Unity/Addressable/プログレス取得]] |
| #Window/Asset Management/Addressables/Groups
| |
| #Build/New Build/Default Build Script
| |
|
| |
|
| プロジェクト以下/ServerData/WebGL/とかにできる
| | [[Unity/SpriteAtlas/Addressable]] [ショートカット] |
| <pre>
| |
| ServerData/WebGL/catalog_v1.0.hash
| |
| ServerData/WebGL/catalog_v1.0.json
| |
| ServerData/WebGL/localization-assets-shared_assets_all.bundle
| |
| ServerData/WebGL/localization-string-tables-chinese(traditional)(zh-tw)_assets_all.bundle
| |
| ServerData/WebGL/localization-string-tables-english(unitedstates)(en-us)_assets_all.bundle
| |
| ServerData/WebGL/localization-string-tables-japanese(japan)(ja-jp)_assets_all.bundle
| |
| </pre>
| |
| | |
| ==AddressablesのRemoteLoadPathの変更==
| |
| #Window/Asset Management/Addressables/Groups
| |
| #Profile:WebGLを選択
| |
| #ManageProfiles
| |
| #RemoteLoadPathを変更する
| |
| | |
| https://qiita.com/tetr4lab/items/1b26755089820b041b4f
| |
| | |
| ==参考==
| |
| https://robamemo.hatenablog.com/entry/2021/01/08/195415
| |
| | |
| https://light11.hatenadiary.com/entry/2020/07/29/202755
| |