Skip to content

Commit df1baa7

Browse files
authored
Merge pull request #8135 from Unity-Technologies/internal/6000.0/staging
Internal/6000.0/staging
2 parents 190ca99 + 6f7ecc3 commit df1baa7

File tree

386 files changed

+40686
-2394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

386 files changed

+40686
-2394
lines changed

Packages/com.unity.render-pipelines.core/Documentation~/Rendering-Debugger.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ If your project uses a custom Scriptable Render Pipeline (SRP), you can add cont
66

77
If your project uses the Universal Render Pipeline (URP) or the High-Definition Render Pipeline (HDRP), refer to the following pages:
88

9-
- [Add controls to the Rendering Debugger in URP](https://docs.unity3d.com/Packages/[email protected]/manual/features/rendering-debugger-add-controls.html)
9+
- [Add controls to the Rendering Debugger in URP](https://docs.unity3d.com/Manual/urp/features/rendering-debugger-add-controls.html)
1010
- [Add controls to the Rendering Debugger in HDRP](https://docs.unity3d.com/Packages/[email protected]/manual/Rendering-Debugger-Add-Controls.html)
1111

1212
## How to access the Rendering Debugger

Packages/com.unity.render-pipelines.core/Documentation~/TableOfContents.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* [What's new](whats-new.md)
33
* [12](whats-new-12.md)
44
* [13](whats-new-13.md)
5+
* [17](whats-new-17.md)
56
* [Creating a custom render pipeline](srp-custom.md)
67
* [Create a custom Scriptable Render Pipeline](srp-custom-getting-started.md)
78
* [Create a Render Pipeline Asset and Render Pipeline Instance in a custom render pipeline](srp-creating-render-pipeline-asset-and-render-pipeline-instance.md)

Packages/com.unity.render-pipelines.core/Documentation~/User-Render-Requests.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The request is processed sequentially in your script, so there's no callback inv
88

99
`RenderPipeline.StandardRequest` renders the following:
1010

11-
* A full stack of cameras in the [Universal Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest/index.html) (URP).
11+
* A full stack of cameras in the [Universal Render Pipeline](https://docs.unity3d.com/Manual/urp/urp-introduction.html) (URP).
1212
* A single camera in the [High Definition Render Pipeline](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest/index.html) (HDRP).
1313

1414
The following code sample gets the output of the scriptable render pipeline when you select a GUI button. Attach the script to a camera and select **Enter Play Mode**.
@@ -91,4 +91,4 @@ public class StandardRenderRequest : MonoBehaviour
9191

9292
## Other useful information
9393

94-
* On [Universal Render Pipeline (URP)](https://docs.unity3d.com/Packages/[email protected]/manual/User-Render-Requests.html).
94+
* On [Universal Render Pipeline (URP)](https://docs.unity3d.com/Manual/urp/User-Render-Requests.html).

Packages/com.unity.render-pipelines.core/Documentation~/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ SRP Core contains reusable code, including boilerplate code for working with pla
66

77
If you are creating a custom SRP from scratch or customizing a prebuilt SRP, using SRP Core will save you time.
88

9-
For more information on SRP, including a guide to getting started with a custom SRP, see the [SRP documentation](https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html). For more information on Unity's prebuilt SRPs, see the [Universal Render Pipeline (URP) documentation](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest), or the [High Definition Render Pipeline (HDRP) documentation](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest).
9+
For more information on SRP, including a guide to getting started with a custom SRP, see the [SRP documentation](https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html). For more information on Unity's prebuilt SRPs, see the [Universal Render Pipeline (URP) documentation](https://docs.unity3d.com/Manual/urp/urp-introduction.html), or the [High Definition Render Pipeline (HDRP) documentation](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest).

Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugState.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,15 @@ public override void SetValue(object value, DebugUI.IValueField field)
237237
/// <summary>
238238
/// Unsigned Integer Debug State.
239239
/// </summary>
240-
[Serializable, DebugState(typeof(DebugUI.UIntField), typeof(DebugUI.MaskField))]
240+
[Serializable, DebugState(typeof(DebugUI.UIntField))]
241241
public sealed class DebugStateUInt : DebugState<uint> { }
242242

243+
/// <summary>
244+
/// Rendering layer mask state.
245+
/// </summary>
246+
[Serializable, DebugState(typeof(DebugUI.RenderingLayerField))]
247+
public sealed class DebugStateRenderingLayer : DebugState<RenderingLayerMask> { }
248+
243249
/// <summary>
244250
/// Float Debug State.
245251
/// </summary>

Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugUIDrawer.Builtins.cs

+4-10
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,11 @@ protected override Enum DoGUI(Rect rect, GUIContent label, DebugUI.BitField fiel
398398
}
399399
}
400400

401-
402401
/// <summary>
403402
/// Builtin Drawer for Maskfield Debug Items.
404403
/// </summary>
405-
[DebugUIDrawer(typeof(DebugUI.MaskField))]
406-
public sealed class DebugUIDrawerMaskField : DebugUIFieldDrawer<uint, DebugUI.MaskField, DebugStateUInt>
404+
[DebugUIDrawer(typeof(DebugUI.RenderingLayerField))]
405+
public sealed class DebugUIDrawerRenderingLayerField : DebugUIFieldDrawer<RenderingLayerMask, DebugUI.RenderingLayerField, DebugStateRenderingLayer>
407406
{
408407
/// <summary>
409408
/// Does the field of the given type
@@ -413,15 +412,10 @@ public sealed class DebugUIDrawerMaskField : DebugUIFieldDrawer<uint, DebugUI.Ma
413412
/// <param name="field">The field</param>
414413
/// <param name="state">The state</param>
415414
/// <returns>The current value from the UI</returns>
416-
protected override uint DoGUI(Rect rect, GUIContent label, DebugUI.MaskField field, DebugStateUInt state)
415+
protected override RenderingLayerMask DoGUI(Rect rect, GUIContent label, DebugUI.RenderingLayerField field, DebugStateRenderingLayer state)
417416
{
418417
uint value = field.GetValue();
419-
420-
var enumNames = new string[field.enumNames.Length];
421-
for (int i = 0; i < enumNames.Length; i++)
422-
enumNames[i] = field.enumNames[i].text;
423-
var mask = EditorGUI.MaskField(rect, label, (int)value, enumNames);
424-
418+
var mask = EditorGUI.MaskField(rect, label, (int)value, field.renderingLayersNames);
425419
return (uint)mask;
426420
}
427421
}

Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugWindow.cs

+10-5
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void OnEnable()
4343
hideFlags = HideFlags.HideAndDontSave;
4444
}
4545
}
46-
46+
4747
[CoreRPHelpURL("Rendering-Debugger")]
4848
sealed class DebugWindow : EditorWindowWithHelpButton, IHasCustomMenu
4949
{
@@ -478,22 +478,22 @@ void OnGUI()
478478
using (new EditorGUILayout.VerticalScope())
479479
{
480480
var selectedPanel = panels[m_Settings.selectedPanel];
481-
481+
482482
using (new EditorGUILayout.HorizontalScope())
483483
{
484484
var style = new GUIStyle(CoreEditorStyles.sectionHeaderStyle) { fontStyle = FontStyle.Bold };
485485
EditorGUILayout.LabelField(new GUIContent(selectedPanel.displayName), style);
486-
486+
487487
// Context menu
488488
var rect = GUILayoutUtility.GetLastRect();
489489
var contextMenuRect = new Rect(rect.xMax, rect.y + 4f, 16f, 16f);
490-
490+
491491
CoreEditorUtils.ShowHelpButton(contextMenuRect, selectedPanel.documentationUrl, new GUIContent($"{selectedPanel.displayName} panel."));
492492
}
493493

494494
const float leftMargin = 4f;
495495
GUILayout.Space(leftMargin);
496-
496+
497497
using (var scrollScope = new EditorGUILayout.ScrollViewScope(m_ContentScroll))
498498
{
499499
TraverseContainerGUI(selectedPanel);
@@ -544,6 +544,11 @@ void OnWidgetGUI(DebugUI.Widget widget)
544544
if (widget.isInactiveInEditor || widget.isHidden)
545545
return;
546546

547+
if (widget.queryPath == null)
548+
{
549+
Debug.LogError($"Widget {widget.GetType()} query path is null");
550+
return;
551+
}
547552
// State will be null for stateless widget
548553
m_WidgetStates.TryGetValue(widget.queryPath, out DebugState state);
549554

Packages/com.unity.render-pipelines.core/Editor/Deprecated.cs

+30
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,34 @@ public DefaultVolumeProfileEditor(Editor baseEditor, VolumeProfile profile)
158158
m_TargetSerializedObject = baseEditor.serializedObject;
159159
}
160160
}
161+
162+
163+
164+
/// <summary>
165+
/// Builtin Drawer for Maskfield Debug Items.
166+
/// </summary>
167+
[DebugUIDrawer(typeof(DebugUI.MaskField))]
168+
[Obsolete("DebugUI.MaskField has been deprecated and is not longer supported, please use BitField instead. #from(6000.2)", false)]
169+
public sealed class DebugUIDrawerMaskField : DebugUIFieldDrawer<uint, DebugUI.MaskField, DebugStateUInt>
170+
{
171+
/// <summary>
172+
/// Does the field of the given type
173+
/// </summary>
174+
/// <param name="rect">The rect to draw the field</param>
175+
/// <param name="label">The label for the field</param>
176+
/// <param name="field">The field</param>
177+
/// <param name="state">The state</param>
178+
/// <returns>The current value from the UI</returns>
179+
protected override uint DoGUI(Rect rect, GUIContent label, DebugUI.MaskField field, DebugStateUInt state)
180+
{
181+
uint value = field.GetValue();
182+
183+
var enumNames = new string[field.enumNames.Length];
184+
for (int i = 0; i < enumNames.Length; i++)
185+
enumNames[i] = field.enumNames[i].text;
186+
var mask = EditorGUI.MaskField(rect, label, (int)value, enumNames);
187+
188+
return (uint)mask;
189+
}
190+
}
161191
}

Packages/com.unity.render-pipelines.core/Editor/Lighting/ProbeVolume/ProbeGIBaking.Serialization.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,11 @@ unsafe static void WriteBakingCells(BakingCell[] bakingCells)
10701070

10711071
AssetDatabase.ImportAsset(cellDataFilename);
10721072
AssetDatabase.ImportAsset(cellOptionalDataFilename);
1073-
AssetDatabase.ImportAsset(cellProbeOcclusionDataFilename);
1073+
// If we did not write a probe occlusion file (because it was zero bytes), don't try to load it (UUM-101480)
1074+
if (probeOcclusion.Length > 0)
1075+
{
1076+
AssetDatabase.ImportAsset(cellProbeOcclusionDataFilename);
1077+
}
10741078
AssetDatabase.ImportAsset(cellBricksDataFilename);
10751079
AssetDatabase.ImportAsset(cellSharedDataFilename);
10761080
AssetDatabase.ImportAsset(cellSupportDataFilename);

0 commit comments

Comments
 (0)