Skip to content

Commit 49fdcda

Browse files
alex-vazquez-unity3dEvergreen
authored andcommitted
HDRP Wizard - Fixing "Fix all" Buttons visibility and GenerateUniqueAssetPath when the default resources folder did not exist.
1 parent 61b40f0 commit 49fdcda

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Packages/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.UIElement.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ void CreateHDRPAsset(Action<HDRenderPipelineAsset> onObjectChanged)
2121
asset.name = typeof(HDRenderPipelineAsset).Name;
2222

2323
string path = $"Assets/{HDProjectSettings.projectSettingsFolderPath}/{asset.name}.asset";
24-
path = AssetDatabase.GenerateUniqueAssetPath(path);
2524
CoreUtils.EnsureFolderTreeInAssetFilePath(path);
26-
27-
AssetDatabase.CreateAsset(asset, path);
25+
26+
var uniqueAssetPath = AssetDatabase.GenerateUniqueAssetPath(path);
27+
AssetDatabase.CreateAsset(asset, uniqueAssetPath);
2828
AssetDatabase.SaveAssets();
2929
AssetDatabase.Refresh();
3030

@@ -326,6 +326,8 @@ public InclusiveModeElement(InclusiveMode mode, string label, string tooltip, HD
326326
}
327327
}
328328

329+
m_FixAllButton.style.display = m_AvailableInCurrentPlatform ? DisplayStyle.Flex : DisplayStyle.None;
330+
329331
foldout.value = HDUserSettings.IsOpen(mode);
330332
foldout.RegisterValueChangedCallback(evt => HDUserSettings.SetOpen(mode, evt.newValue));
331333
foldout.Q(className: "header-foldout__label").tooltip = tooltip; // Tooltip on the label to ensure the position doesn't change when opening the foldout

0 commit comments

Comments
 (0)