Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -229,6 +229,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed support of Distortion with MSAA
- Fixed contact shadow debug views not displaying correctly upon resizing of view.
- Fixed an error when deleting the 3D Texture mask of a local volumetric fog volume (case 1339330).
- 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