private bool HasFolderSelected() { if (newSetupFolder == null) { return(false); } string path = AssetDatabase.GetAssetPath(newSetupFolder); return(Directory.Exists(PresetManagerUtils.RelativeToAbsolutePath(path))); }
private void OnEnable() { relativeFolderPath = AssetDatabase.GetAssetPath(target); absoluteFolderPath = PresetManagerUtils.RelativeToAbsolutePath(relativeFolderPath); isFolder = Directory.Exists(absoluteFolderPath); if (!isFolder) { return; } ReadFolder(); }
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(); }