流れがさっぱりわからないので殴り書き、
サードパーティーを魔改造するなら資料とコメント残して!!
◆AutoyaEntryPoint.cs
起動時シーンロード前にこのメソッドが呼び出されるみたい
RuntimeInitializeOnLoadMethod属性のRuntimeInitializeLoadType.BeforeSceneLoadのおかげっぽい
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
private static void EntryPoint()
{
autoya = new Autoya(Application.persistentDataPath);
}
◆参考URL
https://www.urablog.xyz/entry/2018/02/11/164734
◆AutoyaConstructor.cs
AutoyaMainthreadDispatcherをAddComponentしてDontDestroyに常駐にする。
(Autoyaの処理周りをこいつが担っているっぽい)
if (go == null)
{
go = new GameObject("AutoyaMainthreadDispatcher");
this.mainthreadDispatcher = go.AddComponent<AutoyaMainthreadDispatcher>();
GameObject.DontDestroyOnLoad(go);
}
その後、うちのソースだとキャッシングシステムが使用可能になるまで待ち受けてから
InitialチェックしAutoya使用可能状態とする。
while(!Caching.ready)
yield return null;
InitializeAppManifest();
InitializeAssetBundleFeature();
isReady = true;
}
◆AppManifestImplementation.cs
マニフェストが初期化されキャッシュされる。
private void InitializeAppManifest()
{
_appManifestStore = new AppManifestStore<RuntimeManifestObject, BuildManifestObject>();
}
◆アセットバンドルロード用スクリプト
1. AutoyaConstructor.cs
にてAutoyaの準備完了を待つ
2. 独自ラッパー関数AssetBundleLoader.cs
にて
Autoya参考URL
https://sassembla.github.io/Autoya/docs/en/assetbundle0.html