示例#1
0
 public void Init(IPathConfig pathConfig, Action initSuccess, Action <string> initFail)
 {
     m_pathConfig = pathConfig;
     if (m_helper == null)
     {
         GameObject obj = new GameObject("ResourceManager");
         UObject.DontDestroyOnLoad(obj);
         m_helper = obj.AddComponent <RMMonoHelper>();
     }
     m_badAssetBundleInfo = new AssetBundleInfo(); // asset == null;
     m_helper.TryStartCoroutine(LoadManifest(initSuccess, initFail));
 }
示例#2
0
        public ConfigManager(IPathConfig pathConfig)
        {
            PathSection configSection = System.Configuration.ConfigurationManager.GetSection("pathsSection") as PathSection;

            this.pathConfig = pathConfig;
            string    env   = System.Environment.MachineName.ToUpperInvariant();
            Hashtable paths = configSection.Paths.ToHashtable();

            if (!paths.ContainsKey(env))
            {
                throw new ConfigurationErrorsException("Missing environment " + env);
            }
            this.pathConfig.Path = paths[env].ToString();
        }