示例#1
0
        //----- method -----

        public ManageInfoView(AssetManagement assetManagement, ManageInfo manageInfo, string externalResourcesPath, string shareResourcesPath, IgnoreType?ignoreType, bool open, bool edit)
        {
            this.ignoreType = ignoreType;

            var externalResourcesDir = externalResourcesPath + PathUtility.PathSeparator;
            var shareResourcesDir    = shareResourcesPath + PathUtility.PathSeparator;

            // 確定するまで元のインスタンスに影響を与えないようにコピーに対して編集を行う.
            ManageInfo = manageInfo.DeepCopy();

            IsOpen = open;
            IsEdit = edit;

            manageAssetPath = AssetDatabase.GUIDToAssetPath(manageInfo.guid);
            manageAsset     = AssetDatabase.LoadMainAssetAtPath(manageAssetPath);

            displayManageAssetPath = string.Empty;

            if (manageAssetPath.StartsWith(externalResourcesDir))
            {
                isShareAsset           = false;
                displayManageAssetPath = manageAssetPath.Substring(externalResourcesDir.Length, manageAssetPath.Length - externalResourcesDir.Length);
            }
            else if (manageAssetPath.StartsWith(shareResourcesDir))
            {
                isShareAsset           = true;
                displayManageAssetPath = manageAssetPath.Substring(shareResourcesDir.Length, manageAssetPath.Length - shareResourcesDir.Length);
            }

            contentsScrollView = new ContentsScrollView();

            contentsScrollView.OnRequestDetailViewAsObservable()
            .Subscribe(x => SetDetailView(x))
            .AddTo(Disposable);

            contentAssetsScrollView = new ContentAssetsScrollView(externalResourcesPath, shareResourcesPath);

            BuildContentsInfo(assetManagement);
        }
示例#2
0
        //----- method -----

        public ManageInfoView(ManageInfo manageInfo, AssetCollectInfo[] assetInfos, IgnoreType?ignoreType, bool open, bool edit)
        {
            this.ignoreType = ignoreType;
            this.assetInfos = assetInfos;

            // 確定するまで元のインスタンスに影響を与えないようにコピーに対して編集を行う.
            this.manageInfo = new ManageInfo(manageInfo);

            IsOpen = open;
            IsEdit = edit;

            manageAssetPath = AssetDatabase.GetAssetPath(manageInfo.assetObject);

            contentsScrollView = new ContentsScrollView();

            contentsScrollView.OnRequestDetailViewAsObservable()
            .Subscribe(x => SetDetailView(x))
            .AddTo(Disposable);

            contentAssetsScrollView = new ContentAssetsScrollView();

            BuildContentsInfo();
        }