コード例 #1
0
    void OnSuccess()
    {
#if BUILD_TYPE_DEBUG
        Debug.Log("CALL AssetBundler#OnSuccess:");
#endif

        uint version = 0;
        if (assetbundlepath != null)
        {
            version = assetbundlepath.version;
        }

        AssetBundlerPlayerPrefs.SetVersion(assetBundleName, version);

        if (finishAction != null)
        {
            finishAction(response);
        }

        wwwRelece();

        if (IsAutoDestroyOnSuccess)
        {
            Destroy(gameObject);
        }
    }
コード例 #2
0
    void OnExistsCompatibleCache()
    {
#if UNITY_EDITOR && BUILD_TYPE_DEBUG
        if (DebugOption.Instance.assetBundleDO.alwaysLoadFromCache)
        {
            fsm.SendFsmPositiveEvent();
            return;
        }

        if (DebugOption.Instance.assetBundleDO.disableCache)
        {
            fsm.SendFsmNegativeEvent();
            return;
        }
#endif

        //キャッシュしているバージョンがAssetBundlePathListに設定しているバージョンよりも低い場合
        if (assetbundlepath == null ||
            AssetBundlerPlayerPrefs.GetVersion(assetBundleName) < assetbundlepath.version)
        {
            fsm.SendFsmNegativeEvent();
            return;
        }

        fsm.SendFsmPositiveEvent();
    }