Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c18a188
[SRPF] Updating RenderFunc hashcode calculation
kirill-titov-u Jan 22, 2025
27aed59
[VFX] Fixed invalid cast exception happens when clicking on category …
julienamsellem Jan 22, 2025
68e6e98
UUM-91862 - Fixed incorrect depth texture format exception in URP whe…
olivierprat Jan 22, 2025
756ab22
[2D] Fix Unexpected ZTest Removal
PaulDemeulenaere Jan 22, 2025
9ac74ce
Graphics/SRP/RPF - Fix culling and compute corner cases with NRP Rend…
axoloto Jan 23, 2025
68d3ffb
[SRPF] Multiple fixes for Help buttons
kirill-titov-u Jan 23, 2025
a1dc7c0
HDRP_Tests: MacEditor jobs + General 'PR HDRP' fixes
amsXYZ Jan 23, 2025
22e0817
[2d] Add Sprite-Skinning Node to ShaderGraph.
venkify Jan 23, 2025
50f54cb
Consolidating Rendering Settings in the Rendering Debugger
alex-vazquez-unity3d Jan 24, 2025
08d9c1c
[2d] Fix Unlit shader for Skinning.
venkify Jan 24, 2025
2d32bd2
[UUM-95617] Fix XR depth submission on RenderGraph
mtschoen-unity Jan 24, 2025
dae7a60
2d/staging/tilemap/uum 92738
ChuanXin-Unity Jan 24, 2025
98a9b80
[2d] Fix (Case UUM-71736) Texture is lost when reconnecting SpriteCol…
venkify Jan 24, 2025
d43e85f
Fix Shader Graph subwindow scrolling issues
dhsavell Jan 24, 2025
130f993
deps: use com.unity.searcher@4.9.3 in ShaderGraph
sindharta-tanuwijaya Jan 24, 2025
213280a
[2d] Fix Case UUM-90726
venkify Jan 27, 2025
e0d218b
[2d] Fix SRP-Batcher compatibility for URP 2D Default Shaders.
venkify Jan 27, 2025
f7b8945
[UUM-92486] stop propagation on debug window click
iTris666 Jan 27, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ static bool HandleEvent(bool state, Rect activationRect, Action<Vector2> context
return state;
}

static void ShowHelpButton(Rect contextMenuRect, string documentationURL, GUIContent title)
internal static void ShowHelpButton(Rect contextMenuRect, string documentationURL, GUIContent title)
{
if (string.IsNullOrEmpty(documentationURL))
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using UnityEngine;
using UnityEngine.Assertions;
using UnityEngine.Rendering;
using PackageInfo = UnityEditor.PackageManager.PackageInfo;

namespace UnityEditor.Rendering
{
Expand Down Expand Up @@ -44,7 +43,8 @@ void OnEnable()
hideFlags = HideFlags.HideAndDontSave;
}
}


[CoreRPHelpURL("Rendering-Debugger")]
sealed class DebugWindow : EditorWindowWithHelpButton, IHasCustomMenu
{
static Styles s_Styles;
Expand Down Expand Up @@ -76,37 +76,6 @@ public static bool open
private set => DebugManager.instance.displayEditorUI = value;
}

protected override void OnHelpButtonClicked()
{
//Deduce documentation url and open it in browser
var url = GetSpecificURL() ?? GetDefaultURL();
Application.OpenURL(url);
}

string GetDefaultURL()
{
//Find package info of the current CoreRP package
return $"https://docs.unity3d.com/Packages/com.unity.render-pipelines.core@{DocumentationInfo.version}/manual/Rendering-Debugger.html";
}

string GetSpecificURL()
{
//Find package info of the current RenderPipeline
var currentPipeline = GraphicsSettings.currentRenderPipeline;
if (currentPipeline == null)
return null;

if (!DocumentationUtils.TryGetPackageInfoForType(currentPipeline.GetType(), out var packageName, out var version))
return null;

return packageName switch
{
"com.unity.render-pipelines.universal" => $"https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@{version}/manual/features/rendering-debugger.html",
"com.unity.render-pipelines.high-definition" => $"https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@{version}/manual/Render-Pipeline-Debug-Window.html",
_ => null
};
}

[DidReloadScripts]
static void OnEditorReload()
{
Expand Down Expand Up @@ -508,10 +477,23 @@ void OnGUI()
{
using (new EditorGUILayout.VerticalScope())
{
const float leftMargin = 4f;
GUILayout.Space(leftMargin);
var selectedPanel = panels[m_Settings.selectedPanel];

using (new EditorGUILayout.HorizontalScope())
{
var style = new GUIStyle(CoreEditorStyles.sectionHeaderStyle) { fontStyle = FontStyle.Bold };
EditorGUILayout.LabelField(new GUIContent(selectedPanel.displayName), style);

// Context menu
var rect = GUILayoutUtility.GetLastRect();
var contextMenuRect = new Rect(rect.xMax, rect.y + 4f, 16f, 16f);

CoreEditorUtils.ShowHelpButton(contextMenuRect, selectedPanel.documentationUrl, new GUIContent($"{selectedPanel.displayName} panel."));
}

const float leftMargin = 4f;
GUILayout.Space(leftMargin);

using (var scrollScope = new EditorGUILayout.ScrollViewScope(m_ContentScroll))
{
TraverseContainerGUI(selectedPanel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ internal static void FrameSettingDisabledHelpBox()
var k_EnsureFrameSetting = Type.GetType("UnityEditor.Rendering.HighDefinition.HDEditorUtils,Unity.RenderPipelines.HighDefinition.Editor")
.GetMethod("EnsureFrameSetting", BindingFlags.Static | BindingFlags.NonPublic);

k_EnsureFrameSetting.Invoke(null, new object[] { k_APVFrameSetting, "Adaptive Probe Volumes" });
k_EnsureFrameSetting.Invoke(null, new object[] { k_APVFrameSetting});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace UnityEditor.Rendering.LookDev
/// <summary>
/// Class containing a collection of Environment
/// </summary>
[CoreRPHelpURL("Environment-Library")]
[CoreRPHelpURL("Look-Dev-Environment-Library")]
public class EnvironmentLibrary : ScriptableObject
{
[field: SerializeField]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using UnityEditor.Rendering.Analytics;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.RenderGraphModule;
using UnityEngine.Scripting.APIUpdating;
using UnityEngine.UIElements;
Expand All @@ -13,7 +14,8 @@ namespace UnityEditor.Rendering
/// Editor window class for the Render Graph Viewer
/// </summary>
[MovedFrom("")]
public partial class RenderGraphViewer : EditorWindow
[CoreRPHelpURL(packageName: "com.unity.render-pipelines.universal", pageName: "render-graph-view")]
public partial class RenderGraphViewer : EditorWindowWithHelpButton
{
static partial class Names
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public ListChangedEventArgs(int index, T item)
/// <typeparam name="T">Type of the list.</typeparam>
public class ObservableList<T> : IList<T>
{
IList<T> m_List;
List<T> m_List;
private readonly Comparison<T> m_Comparison;

/// <summary>
/// Added item event.
Expand Down Expand Up @@ -98,18 +99,23 @@ public ObservableList()
/// Constructor.
/// </summary>
/// <param name="capacity">Allocation size.</param>
public ObservableList(int capacity)
/// <param name="comparison">The comparision if you want the list to be sorted</param>
public ObservableList(int capacity, Comparison<T> comparison = null)
{
m_List = new List<T>(capacity);
m_Comparison = comparison;
}

/// <summary>
/// Constructor.
/// </summary>
/// <param name="collection">Input list.</param>
public ObservableList(IEnumerable<T> collection)
/// <param name="comparison">The comparision if you want the list to be sorted</param>
public ObservableList(IEnumerable<T> collection, Comparison<T> comparison = null)
{
m_List = new List<T>(collection);
m_Comparison = comparison;
Sort(); // Make sure the given list is sorted
}

void OnEvent(ListChangedEventHandler<T> e, int index, T item)
Expand Down Expand Up @@ -145,6 +151,7 @@ public int IndexOf(T item)
public void Add(T item)
{
m_List.Add(item);
Sort();
OnEvent(ItemAdded, m_List.IndexOf(item), item);
}

Expand All @@ -166,6 +173,7 @@ public void Add(params T[] items)
public void Insert(int index, T item)
{
m_List.Insert(index, item);
Sort();
OnEvent(ItemAdded, index, item);
}

Expand Down Expand Up @@ -248,5 +256,13 @@ IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}

private void Sort()
{
if (m_Comparison != null)
{
m_List.Sort(m_Comparison);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine.Rendering.RenderGraphModule;

namespace UnityEngine.Rendering
Expand Down Expand Up @@ -51,6 +52,9 @@ public void RegisterDebug(IDebugDisplaySettings settings)
displayName: disposableSettingsPanel.PanelName,
createIfNull: true,
groupIndex: (disposableSettingsPanel is DebugDisplaySettingsPanel debugDisplaySettingsPanel) ? debugDisplaySettingsPanel.Order : 0);
#if UNITY_EDITOR
panel.documentationUrl = disposableSettingsPanel.GetType().GetCustomAttribute<HelpURLAttribute>()?.URL;
#endif

ObservableList<DebugUI.Widget> panelChildren = panel.children;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,17 @@ public class Panel : IContainer, IComparable<Panel>
/// Callback used when the panel is set dirty.
/// </summary>
public event Action<Panel> onSetDirty = delegate { };

#if UNITY_EDITOR
public string documentationUrl { get; set; }
#endif

/// <summary>
/// Constructor.
/// </summary>
public Panel()
{
children = new ObservableList<Widget>();
children = new ObservableList<Widget>(0, (widget, widget1) => widget.order.CompareTo(widget1.order));
children.ItemAdded += OnItemAdded;
children.ItemRemoved += OnItemRemoved;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace UnityEngine.Rendering
/// state (e.g., whether it is in the editor or playing at runtime).
/// - `DebugUI` also includes helper methods for widget initialization, such as compact initialization using the `NameAndTooltip` struct.
///
/// This API lets you do the following:
/// This API lets you do the following:
/// - Specify widget behavior such as "EditorOnly", "RuntimeOnly", "EditorForceUpdate", and "FrequentlyUsed".
/// - Show dynamic data with optional formatting.
/// - Specify delegate functions to show or hide widgets
Expand Down Expand Up @@ -53,10 +53,10 @@ namespace UnityEngine.Rendering
/// {
/// // Set the display label
/// displayName = "Current Time",
///
///
/// // Set the format for the time
/// getter = () => System.DateTime.Now.ToString("HH:mm:ss"),
///
///
/// // Set the value to refresh every second
/// refreshRate = 1f
/// };
Expand Down Expand Up @@ -103,6 +103,11 @@ public enum Flags
/// </summary>
public abstract class Widget
{
/// <summary>
/// The order of the widget
/// </summary>
public int order { get; set; } = 0;

// Set to null until it's added to a panel, be careful
/// <summary>
/// Panels containing the widget.
Expand Down
Loading