示例#1
0
        private void Initialize()
        {
            if (initialized)
            {
                return;
            }

            ManageConfig.OnReloadAsObservable()
            .Subscribe(_ => Setup())
            .AddTo(Disposable);

            Setup();

            initialized = true;
        }
示例#2
0
        public void Initialize()
        {
            var projectFolders = ProjectFolders.Instance;

            if (projectFolders == null)
            {
                return;
            }

            var managedAssets = ManagedAssets.Instance;

            if (managedAssets == null)
            {
                return;
            }

            if (initialized)
            {
                return;
            }

            externalResourcesPath = projectFolders.ExternalResourcesPath;
            shareResourcesPath    = projectFolders.ShareResourcesPath;

            managedAssets.DeleteInvalidInfo();

            managedInfos = managedAssets.GetAllInfos().ToDictionary(x => x.guid);

            ManageConfig.OnReloadAsObservable()
            .Subscribe(_ =>
            {
                ignoreManagePaths      = null;
                ignoreAssetBundlePaths = null;
            })
            .AddTo(Disposable);

            initialized = true;
        }