Skip to content
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
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 @@ -259,6 +259,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed an issue with resolution dependence for physically based depth of field.
- Fixed the shader graph files that was still dirty after the first save (case 1342039).
- Fixed cases in which object and camera motion vectors would cancel out, but didn't.
- Fixed HDRP material upgrade failing when there is a texture inside the builtin resources assigned in the material (case 1339865).

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public Texture2D Combine(string savePath)
//cleanup "raw" textures
foreach (KeyValuePair<Texture, Texture> prop in m_RawTextures)
{
if (AssetDatabase.Contains(prop.Value))
if (prop.Key != prop.Value && AssetDatabase.Contains(prop.Value))
AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(prop.Value));
}

Expand All @@ -262,13 +262,12 @@ private Texture GetRawTexture(Texture original, bool sRGBFallback = false)
if (m_RawTextures == null) m_RawTextures = new Dictionary<Texture, Texture>();
if (!m_RawTextures.ContainsKey(original))
{
if (AssetDatabase.Contains(original))
{
string path = AssetDatabase.GetAssetPath(original);
string rawPath = "Assets/raw_" + Path.GetFileName(path);

AssetDatabase.CopyAsset(path, rawPath);
string path = AssetDatabase.GetAssetPath(original);
string rawPath = "Assets/raw_" + Path.GetFileName(path);
bool isBuiltinResource = path.Contains("unity_builtin");

if (!isBuiltinResource && AssetDatabase.Contains(original) && AssetDatabase.CopyAsset(path, rawPath))
{
AssetDatabase.ImportAsset(rawPath);

TextureImporter rawImporter = (TextureImporter)AssetImporter.GetAtPath(rawPath);
Expand Down