LoginSignup
0
0

More than 5 years have passed since last update.

Autoyaメモ(途中)

Last updated at Posted at 2019-03-29

流れがさっぱりわからないので殴り書き、
サードパーティーを魔改造するなら資料とコメント残して!!

◆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

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0