コード例 #1
0
        private bool HasFolderSelected()
        {
            if (newSetupFolder == null)
            {
                return(false);
            }

            string path = AssetDatabase.GetAssetPath(newSetupFolder);

            return(Directory.Exists(PresetManagerUtils.RelativeToAbsolutePath(path)));
        }
コード例 #2
0
        private void OnEnable()
        {
            relativeFolderPath = AssetDatabase.GetAssetPath(target);
            absoluteFolderPath = PresetManagerUtils.RelativeToAbsolutePath(relativeFolderPath);
            isFolder           = Directory.Exists(absoluteFolderPath);

            if (!isFolder)
            {
                return;
            }

            ReadFolder();
        }
コード例 #3
0
        private void OnEnable()
        {
            if (!PresetManagerSettings.DisplayFolderInspector)
            {
                return;
            }

            relativeFolderPath = AssetDatabase.GetAssetPath(target);
            if (!relativeFolderPath.StartsWith("Assets"))
            {
                return;
            }

            absoluteFolderPath = PresetManagerUtils.RelativeToAbsolutePath(relativeFolderPath);
            isFolder           = Directory.Exists(absoluteFolderPath);

            if (!isFolder)
            {
                return;
            }

            ReadFolder();
        }