From e2cad5d2ec24a65126e9e2659cab50ecbbf1fb55 Mon Sep 17 00:00:00 2001 From: FrancescoC-Unity Date: Mon, 8 Feb 2021 15:15:36 +0100 Subject: [PATCH] Change wizard check to be ok with -force api --- .../Editor/Wizard/HDWizard.Configuration.cs | 2 +- .../Editor/Wizard/HDWizard.Window.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs b/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs index 3029407d5e8..7c0baea328e 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Configuration.cs @@ -580,7 +580,7 @@ void FixDXRAutoGraphicsAPI(bool fromAsyncUnused) => PlayerSettings.SetUseDefaultGraphicsAPIs(CalculateSelectedBuildTarget(), false); bool IsDXRDirect3D12Correct() - => PlayerSettings.GetGraphicsAPIs(CalculateSelectedBuildTarget()).FirstOrDefault() == GraphicsDeviceType.Direct3D12 && !HDProjectSettings.wizardNeedRestartAfterChangingToDX12; + => (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D12) && !HDProjectSettings.wizardNeedRestartAfterChangingToDX12; void FixDXRDirect3D12(bool fromAsyncUnused) { if (GetSupportedGraphicsAPIs(CalculateSelectedBuildTarget()).Contains(GraphicsDeviceType.Direct3D12)) diff --git a/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Window.cs b/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Window.cs index 7800b3ba87f..e9e600b6d59 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Window.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Wizard/HDWizard.Window.cs @@ -134,7 +134,7 @@ public ConfigStyle(string label, string error, string button = resolve, MessageT error: "Auto Graphics API is not supported!"); public static readonly ConfigStyle dxrD3D12 = new ConfigStyle( label: "Direct3D 12", - error: "Direct3D 12 is needed! (Editor restart is required)"); + error: "Direct3D 12 needs to be the active device! (Editor restart is required). If an API different than D3D12 is forced via command line argument, clicking Fix won't change it, so please consider removing it if wanting to run DXR."); public static readonly ConfigStyle dxrScreenSpaceShadow = new ConfigStyle( label: "Screen Space Shadows (Asset)", error: "Screen Space Shadows are disabled in the current HDRP Asset which means you cannot enable ray-traced shadows for lights in your scene. To enable this feature, open your HDRP Asset, go to Lighting > Shadows, and enable Screen Space Shadows", messageType: MessageType.Warning);