コード例 #1
0
        public virtual void DoInitialize(AssetDetailConfig detailConfig, OnInitFinished initCallback, params SystemObject[] values)
        {
            State = LoaderState.Initializing;

            assetDetailConfig   = detailConfig;
            initializedCallback = initCallback;
        }
コード例 #2
0
        public static void Init(OnInitFinished finishedCallback)
        {
#if LOADER_BUNDLE
            string            assetFilePath     = AssetConst.GetAssetDetailConfigFullPathForBundle();
            AssetDetailConfig assetDetailConfig = JSONReader.ReadFromFile <AssetDetailConfig>(assetFilePath);
            assetDetailConfig.InitConfig();

            string             bundleFilePath     = AssetConst.GetBundleDetailConfigFullPath();
            BundleDetailConfig bundleDetailConfig = JSONReader.ReadFromFile <BundleDetailConfig>(bundleFilePath);
            bundleDetailConfig.InitConfig();

            loader = new BundleLoader();
            loader.DoInitialize(assetDetailConfig, (result) =>
            {
                Debug.Log("LoaderUtill::Init->init finished result = " + result);
                finishedCallback?.Invoke(result);
            }, AssetConst.GetRootFullDirForBundle(), bundleDetailConfig);
#elif LOADER_RESOURCE
#else
            string            assetFilePath     = AssetConst.GetAssetDetailConfigFullPathForDatabase();
            AssetDetailConfig assetDetailConfig = JSONReader.ReadFromFile <AssetDetailConfig>(assetFilePath);
            assetDetailConfig.InitConfig();

            loader = new DatabaseLoader();
            loader.DoInitialize(assetDetailConfig, (result) =>
            {
                Debug.Log("LoaderUtill::Init->init finished result = " + result);
                finishedCallback?.Invoke(result);
            });
#endif
            loaderBehaviour = PersistentUObjectHelper.CreateComponent <LoaderBehaviour>();
            loaderBehaviour.SetLoader(loader);
        }
コード例 #3
0
        public override void DoInitialize(AssetDetailConfig detailConfig, OnInitFinished initCallback, params object[] values)
        {
            base.DoInitialize(detailConfig, initCallback, values);

            bundleRootDir      = (string)(values[0]);
            bundleDetailConfig = (BundleDetailConfig)(values[1]);
        }