public void Init(bool resourceLoadMode, string resRootDir) { _succCallbacks = new Dictionary <Resource, List <ResourceHandler> >(); _failCallbacks = new Dictionary <Resource, List <ResourceHandler> >(); _mapRes = new Dictionary <string, Resource>(); _resLoader = ResourceLoader.GetResLoader(this.gameObject); _resLoader.OnDone += OnResourceDone; ResourcesLoadMode = resourceLoadMode; ResourceFileUtil resUtil = gameObject.AddComponentOnce <ResourceFileUtil>(); resUtil.Init(resRootDir); _assetBundleMgr = gameObject.AddComponentOnce <AssetBundleMgr>(); }
private void OnDestroy() { _resUtil = null; }
private void Awake() { _resUtil = gameObject.AddComponentOnce <ResourceFileUtil>(); }