Skip to content

Commit 79b46f4

Browse files
RSlyszEvergreen
authored andcommitted
[URP] [Hidding CompatibilityMode] Add back dummy API version when define is not here to help user upgrade
1 parent 96e2467 commit 79b46f4

19 files changed

+587
-25
lines changed

Packages/com.unity.render-pipelines.universal/Editor/BuildProcessors/URPBuildDataValidator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ private static void ValidateCompatibilityMode(UniversalRenderPipelineGlobalSetti
7777
EditorApplication.delayCall += () =>
7878
{
7979
int answear = EditorUtility.DisplayDialogComplex("Universal Render Pipeline's Compatibility Mode",
80-
"Unity can't build your project because Compatibility Mode (Render Graph disabled) is enabled. This feature is deprecated. Unity now uses the render graph system instead.\n\n" +
81-
"Select \"Use Render Graph\" (Recommended) to update your Project Settings to use the render graph system. You might need to manually update your scripts and assets.\n\n" +
82-
"Select \"Keep Compatibility Mode\" to add a URP_COMPATIBILITY_MODE define to the Scripting Define Symbols in Player Settings for your current build target. Warning: Compatibility Mode will be fully removed in a future release.",
80+
"Unity can't build your project because Compatibility Mode (Render Graph disabled) is active. This feature is deprecated.\n\n" +
81+
"Select \"Use Render Graph\" (Recommended) to update Project Settings. You may need to update scripts and assets.\n\n" +
82+
"Select \"Keep Compatibility Mode\" to add URP_COMPATIBILITY_MODE to Player Settings for this build target. Warning: Compatibility Mode will be removed in a future release.",
8383
"Use Render Graph",
8484
"Cancel",
8585
"Keep Compatibility Mode");

Packages/com.unity.render-pipelines.universal/Runtime/Deprecated.cs

Lines changed: 563 additions & 3 deletions
Large diffs are not rendered by default.

Packages/com.unity.render-pipelines.universal/Runtime/ForwardLights.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace UnityEngine.Rendering.Universal.Internal
1515
/// <summary>
1616
/// Computes and submits lighting data to the GPU.
1717
/// </summary>
18-
public class ForwardLights
18+
public partial class ForwardLights
1919
{
2020
static class LightConstantBuffer
2121
{

Packages/com.unity.render-pipelines.universal/Runtime/FrameData/UniversalCameraData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace UnityEngine.Rendering.Universal
77
/// <summary>
88
/// Class that holds settings related to camera.
99
/// </summary>
10-
public class UniversalCameraData : ContextItem
10+
public partial class UniversalCameraData : ContextItem
1111
{
1212
// Internal camera data as we are not yet sure how to expose View in stereo context.
1313
// We might change this API soon.

Packages/com.unity.render-pipelines.universal/Runtime/Passes/ColorGradingLutPass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace UnityEngine.Rendering.Universal.Internal
99
/// <summary>
1010
/// Renders a color grading LUT texture.
1111
/// </summary>
12-
public class ColorGradingLutPass : ScriptableRenderPass
12+
public partial class ColorGradingLutPass : ScriptableRenderPass
1313
{
1414
readonly Material m_LutBuilderLdr;
1515
readonly Material m_LutBuilderHdr;

Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyColorPass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace UnityEngine.Rendering.Universal.Internal
1212
/// so you can use it later in rendering. For example, you can copy
1313
/// the opaque texture to use it for distortion effects.
1414
/// </summary>
15-
public class CopyColorPass : ScriptableRenderPass
15+
public partial class CopyColorPass : ScriptableRenderPass
1616
{
1717
int m_SampleOffsetShaderHandle;
1818
Material m_SamplingMaterial;

Packages/com.unity.render-pipelines.universal/Runtime/Passes/CopyDepthPass.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace UnityEngine.Rendering.Universal.Internal
1313
/// does not have MSAA enabled, the pass uses a Blit or a Copy Texture
1414
/// operation, depending on what the current platform supports.
1515
/// </summary>
16-
public class CopyDepthPass : ScriptableRenderPass
16+
public partial class CopyDepthPass : ScriptableRenderPass
1717
{
1818
// TODO RENDERGRAPH: The Render method overwrites this property with -1 before doing anything else. It should only be used in Compatibility Mode!
1919
internal int MsaaSamples { get; set; }
@@ -231,19 +231,19 @@ private static void ExecutePass(RasterCommandBuffer cmd, PassData passData, RTHa
231231
}
232232
}
233233

234-
#if URP_COMPATIBILITY_MODE
235234
/// <inheritdoc/>
236235
public override void OnCameraCleanup(CommandBuffer cmd)
237236
{
237+
#if URP_COMPATIBILITY_MODE
238238
if (cmd == null)
239239
throw new ArgumentNullException("cmd");
240240

241241
// Disable obsolete warning for internal usage
242242
#pragma warning disable CS0618
243243
destination = k_CameraTarget;
244244
#pragma warning restore CS0618
245-
}
246245
#endif
246+
}
247247

248248
/// <summary>
249249
/// Sets up the Copy Depth pass for RenderGraph execution

Packages/com.unity.render-pipelines.universal/Runtime/Passes/DepthNormalOnlyPass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace UnityEngine.Rendering.Universal.Internal
88
/// <summary>
99
/// Render all objects that have a 'DepthNormals' and/or 'DepthNormalsOnly' pass into the given depth and normal buffers.
1010
/// </summary>
11-
public class DepthNormalOnlyPass : ScriptableRenderPass
11+
public partial class DepthNormalOnlyPass : ScriptableRenderPass
1212
{
1313
internal List<ShaderTagId> shaderTagIds { get; set; }
1414
internal bool enableRenderingLayers { get; set; } = false;

Packages/com.unity.render-pipelines.universal/Runtime/Passes/DepthOnlyPass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace UnityEngine.Rendering.Universal.Internal
1010
/// You can use this pass to prime a depth buffer for subsequent rendering.
1111
/// Use it as a z-prepass, or use it to generate a depth buffer.
1212
/// </summary>
13-
public class DepthOnlyPass : ScriptableRenderPass
13+
public partial class DepthOnlyPass : ScriptableRenderPass
1414
{
1515
internal ShaderTagId shaderTagId { get; set; } = k_ShaderTagId;
1616

Packages/com.unity.render-pipelines.universal/Runtime/Passes/DrawObjectsPass.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace UnityEngine.Rendering.Universal.Internal
1212
/// You can use this pass to render objects that have a material and/or shader
1313
/// with the pass names UniversalForward or SRPDefaultUnlit.
1414
/// </summary>
15-
public class DrawObjectsPass : ScriptableRenderPass
15+
public partial class DrawObjectsPass : ScriptableRenderPass
1616
{
1717
FilteringSettings m_FilteringSettings;
1818
RenderStateBlock m_RenderStateBlock;

0 commit comments

Comments
 (0)