/// <summary>
 /// 初始化资源系统
 /// 注意:在使用AssetSystem之前需要初始化
 /// </summary>
 public static void Initialize(string locationRoot, bool simulationOnEditor, IBundleServices bundleServices, IDecryptServices decryptServices)
 {
     if (_isInitialize == false)
     {
         _isInitialize      = true;
         LocationRoot       = AssetPathHelper.GetRegularPath(locationRoot);
         SimulationOnEditor = simulationOnEditor;
         BundleServices     = bundleServices;
         DecryptServices    = decryptServices;
     }
     else
     {
         throw new Exception($"{nameof(AssetSystem)} is already initialized");
     }
 }
Exemple #2
0
        /// <summary>
        /// 初始化资源系统
        /// 注意:在使用AssetSystem之前需要初始化
        /// </summary>
        public static void Initialize(string locationRoot, bool simulationOnEditor, int runtimeMaxLoadingCount, IBundleServices bundleServices, IDecryptServices decryptServices)
        {
            if (_isInitialize == false)
            {
                _isInitialize = true;

                if (runtimeMaxLoadingCount < 3)
                {
                    runtimeMaxLoadingCount = 3;
                    MotionLog.Warning("AssetSystem RuntimeMaxLoadingCount minimum is 3");
                }

                LocationRoot           = AssetPathHelper.GetRegularPath(locationRoot);
                SimulationOnEditor     = simulationOnEditor;
                RuntimeMaxLoadingCount = runtimeMaxLoadingCount;
                BundleServices         = bundleServices;
                DecryptServices        = decryptServices;
            }
            else
            {
                throw new Exception($"{nameof(AssetSystem)} is already initialized");
            }
        }