Skip to content

path validation when creating new volume profile #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,22 @@ public static VolumeProfile CreateVolumeProfile(Scene scene, string targetName)
{
var scenePath = Path.GetDirectoryName(scene.path);
var extPath = scene.name;
var profilePath = scenePath + "/" + extPath;
var profilePath = scenePath + Path.DirectorySeparatorChar + extPath;

if (!AssetDatabase.IsValidFolder(profilePath))
AssetDatabase.CreateFolder(scenePath, extPath);
{
var directories = profilePath.Split(Path.DirectorySeparatorChar);
string rootPath = "";
foreach (var directory in directories)
{
var newPath = rootPath + directory;
if (!AssetDatabase.IsValidFolder(newPath))
AssetDatabase.CreateFolder(rootPath.TrimEnd(Path.DirectorySeparatorChar), directory);
rootPath = newPath + Path.DirectorySeparatorChar;
}
}

path = profilePath + "/";
path = profilePath + Path.DirectorySeparatorChar;
}

path += targetName + " Profile.asset";
Expand Down
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed a weird behavior in the scalable settings drawing when the space becomes tiny (1212045).
- Fixed a regression in the ray traced indirect diffuse due to the new probe system.
- Fix for range compression factor for probes going negative (now clamped to positive values).
- Fixed path validation when creating new volume profile (case 1229933)

### Changed
- Color buffer pyramid is not allocated anymore if neither refraction nor distortion are enabled
Expand Down