Ejemplo n.º 1
0
        private ResultCode CreateImpl(IAssetManager manager, RuntimePlatform platform, IVersionManifest manifest, AssetBundleConfig config)
        {
            var table = m_parser.Parse(manifest.RawData);

            ChipstarLog.Log_GetBuildMap <TTable, TBundle, TAsset>(table);
            if (table == null)
            {
                return(ChipstarResult.ClientError("Json Parse Error"));
            }
            //  アセットの一覧
            foreach (var asset in table.AssetList)
            {
                var d = new AssetData(asset);
                m_assetsTable.Add(d.Path, d);
            }

            //  バンドルの一覧
            foreach (var bundle in table.BundleList)
            {
                var runtime = m_bundleDataCreater.Create(manager, bundle, platform, config);
                m_bundleTable.Add(bundle.Identifier, runtime);
            }
            //  依存関係とアセットデータを接続
            foreach (var bundle in table.BundleList)
            {
                var runtime      = m_bundleTable[bundle.Identifier];
                var dependencies = CreateDependencies(bundle);
                var assets       = CreateAssets(bundle);
                foreach (var asset in assets)
                {
                    asset.Connect(runtime);
                }
                runtime.Set(dependencies);
            }
            return(ChipstarResult.Success);
        }
Ejemplo n.º 2
0
        //======================================
        //	関数
        //======================================

        public AssetBundleSceneLoadOperation(AssetData data, LoadSceneMode mode) : base(mode)
        {
            m_data = data;
            m_data?.AddRef();
        }
Ejemplo n.º 3
0
        //====================================
        //	プロパティ
        //====================================
        //====================================
        //	関数
        //====================================

        /// <summary>
        /// コンストラクタ
        /// </summary>
        public AssetBundleLoadOperation(AssetData data)
        {
            m_data = data;
            m_data?.AddRef();
        }