Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bb6c1b9
URP - Avoid persistent memory allocation (_CameraTargetAttachmentX) i…
YohannVaastUnity Jun 2, 2025
e8049c6
docg-7131: Add link to HDRP Water system Advanced Properties
ocarrere Jun 2, 2025
bb88a29
HDRP Fix Decal Projector Layer Mask Override
eh-unity Jun 3, 2025
1659325
accessibility-olivier-may-25-2025-visualeffectgraph
ocarrere Jun 3, 2025
7c01fad
RG Error Handling - Improve exception handling
RoseHirigoyen Jun 3, 2025
90d5b72
Reverting changes for Volume System to keep precompiled assemblies to…
kirill-titov-u Jun 4, 2025
b5d14a7
Fixed undisposed arrays in ProcessRendererMaterialAndMeshChanges
lorin-atzberger-unity Jun 4, 2025
70b6089
Accessibility tables update for Adaptive Probe Volumes panel properties
Sam-Unity Jun 4, 2025
b0434d1
[SHADERS-1032] Expose all 8 texcoords in Shader Graph
Jun 4, 2025
c0405ac
Fix pink previews after upgrading materials from BiRP to URP/HDRP
arttu-peltonen Jun 4, 2025
9338c35
[UUM-90714] Fix for ShadowCaster2D breaks on certain Rotation positio…
unity-cchu Jun 4, 2025
d537ba2
docg-7165: Add row for Debug panel
ocarrere Jun 4, 2025
4372c78
[URP] Fix post process init in RG when no postProcessData
RSlysz Jun 4, 2025
c6f0131
Graphics/SRP - Render Graph Consolidation - Replace Render Graph Crea…
axoloto Jun 4, 2025
5e7509f
[VFX] Improving VFX default resources
OrsonFavrel Jun 5, 2025
6a852a5
[ShaderGraph] fix a bunch of docs/visual bugs
Jun 5, 2025
1de6726
DOCG-7173 Combine VFX Graph Trigger Event Blocks docs
markg-unity Jun 5, 2025
ff05f3f
[VFX] Add BaseColorMap to Unlit
PaulDemeulenaere Jun 6, 2025
4fcc3f9
[HDRP] Bind missing buffer for debug shaders
pmavridis Jun 6, 2025
8bad516
[URP] [Hidding CompatibilityMode] UI, upgrade and URP_COMPAIBILITY_MO…
RSlysz Jun 6, 2025
072c132
RenderGraph Viewer Remote - Custom UI Element for ToggleDropDown
LagueKristin Jun 6, 2025
1d3eb4f
[HDRP] Fix artifacts when using HDRP with Screen Space Reflections in XR
remi-chapelain Jun 6, 2025
3b9611b
Fix for the incorrect size of Disc light in pathtracing
Jun 6, 2025
2204967
RenderGraph perf tests for URP (NoRgCache) + minor debug data optimiz…
arttu-peltonen Jun 6, 2025
2543791
[UUM-70734] Fix for Size of ShadowCaster2D with Casting Source set to…
unity-cchu Jun 9, 2025
749774a
[ShaderGraph] Add toggle to override the shader variant limit.
Jun 10, 2025
be68a66
[HDRP] [Docs] Update documentation of the accumulation API regarding …
pmavridis Jun 10, 2025
cf230bb
Fix warning in fog volume shader
alelievr Jun 11, 2025
91ef84e
Set color RenderTarget at InvokeOnRenderObjectCallbackPass
raquelpeces Jun 12, 2025
237c1c8
[VFX] Disable Some Tests on Switch
PaulDemeulenaere Jun 12, 2025
9e50da6
[SRP] Set 17.0.3 compatibility version with Unity 6000.2.0a5
theo-at-unity Jun 12, 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
2 changes: 1 addition & 1 deletion Packages/com.unity.render-pipelines.core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This version is compatible with Unity 6000.2.0b2.

## [17.0.3] - 2025-02-13

This version is compatible with Unity 6000.2.0a17.
This version is compatible with Unity 6000.2.0a5.

### Added
- Added Variable Rate Shading API support for (Raster)CommandBuffer(s), RenderGraph and RTHandles.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ There is a global state per user that stores if Unity displays **advanced proper
Not every component or Volume Override includes advanced properties.
If one does, it has a contextual menu to the right of each property section header that includes additional properties. To expose advanced properties for that section, open the contextual menu and click **Advanced Properties**.

For an example, see the **Water Surface** component in [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest).
For an example, refer to the **Water Surface** component in [High Definition Render Pipeline (HDRP)](https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@latest?subfolder=/manual/settings-and-properties-related-to-the-water-system.html).

By default only standard properties are shown.

Expand Down
8 changes: 8 additions & 0 deletions Packages/com.unity.render-pipelines.core/Editor/Controls.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,292 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;

namespace UnityEditor.Rendering
{
[UxmlElement]
internal partial class ToggleDropdown : VisualElement
{
const string k_StylesheetPathFormat = "Packages/com.unity.render-pipelines.core/Editor/Controls/ToggleDropdown.uss";
const string k_MainClass = "toggle-dropdown";
const string k_ToggleButtonClass = k_MainClass + "__toggle-button";
const string k_DropdownButtonClass = k_MainClass + "__dropdown-button";
const string k_SeparatorClass = k_MainClass + "__separator";
const string k_EnabledClass = k_MainClass + "--enabled";

private Button m_ToggleButton;
private Button m_DropdownButton;
private VisualElement m_DropdownArrow;
private VisualElement m_Separator;
private List<string> m_Options = new List<string>();
private HashSet<int> m_SelectedIndices = new HashSet<int>();
private int m_SelectedIndex = 0;
private bool m_IsEnabled = false;
private string m_Text = "Toggle Dropdown";

[UxmlAttribute]
public string text
{
get => m_Text;
set
{
if (m_Text == value)
return;
m_Text = value;
m_ToggleButton.text = m_Text;
}
}

[UxmlAttribute]
private string options { get; set; } = "";

[UxmlAttribute("selected-index")]
private int selectedIndex
{
get => m_SelectedIndex;
set
{
if (m_SelectedIndex == value || value < 0)
return;
m_SelectedIndex = value;
}
}

[UxmlAttribute("selected-indices")]
public string selectedIndices
{
get
{
var indices = new List<string>();
foreach (int index in m_SelectedIndices)
{
indices.Add(index.ToString());
}
return string.Join(",", indices.ToArray());
}
set
{
m_SelectedIndices.Clear();
if (!string.IsNullOrEmpty(value))
{
var indices = value.Split(',');
foreach (var indexStr in indices)
{
if (int.TryParse(indexStr.Trim(), out int index) && index >= 0)
{
m_SelectedIndices.Add(index);
}
}
}
}
}

[UxmlAttribute]
public bool value
{
get => m_IsEnabled;
set
{
if (m_IsEnabled == value)
return;
m_IsEnabled = value;
UpdateEnabledState();
}
}

/// <summary>Get the currently selected option text (first selected)</summary>
public string selectedOption
{
get
{
foreach (int index in m_SelectedIndices)
{
if (index < m_Options.Count)
return m_Options[index];
}
return "";
}
}

/// <summary>Get all selected options</summary>
public string[] selectedOptions
{
get
{
var result = new List<string>();
foreach (int index in m_SelectedIndices)
{
if (index < m_Options.Count)
result.Add(m_Options[index]);
}
return result.ToArray();
}
}

/// <summary>Get all selected indices</summary>
public int[] GetSelectedIndices()
{
var result = new int[m_SelectedIndices.Count];
int i = 0;
foreach (int index in m_SelectedIndices)
{
result[i++] = index;
}
return result;
}

/// <summary>Event fired when selection changes</summary>
public event System.Action<int[]> selectionChanged;

/// <summary>Event fired when toggle state changes</summary>
public event System.Action<bool> toggleChanged;

/// <summary>Constructor</summary>
public ToggleDropdown()
{
styleSheets.Add(AssetDatabase.LoadAssetAtPath<StyleSheet>(k_StylesheetPathFormat));
AddToClassList(k_MainClass);

RegisterCallback<AttachToPanelEvent>(DelayedInit);

m_ToggleButton = new Button(OnToggleClicked);
m_ToggleButton.AddToClassList(k_ToggleButtonClass);
Add(m_ToggleButton);

m_DropdownButton = new Button(ShowCustomDropdown);
m_DropdownButton.AddToClassList(k_DropdownButtonClass);

m_DropdownArrow = new VisualElement();
m_DropdownArrow.AddToClassList("unity-toolbar-menu__arrow");
m_DropdownButton.Add(m_DropdownArrow);

m_Separator = new VisualElement();
m_Separator.AddToClassList(k_SeparatorClass);
Add(m_Separator);

Add(m_DropdownButton);
}

void DelayedInit(AttachToPanelEvent evt)
{
if (!string.IsNullOrEmpty(options))
{
var optionArray = options.Split(',');
for (int i = 0; i < optionArray.Length; i++)
{
optionArray[i] = optionArray[i].Trim();
}
SetOptions(optionArray);
}

if (selectedIndex >= 0)
{
m_SelectedIndices.Add(selectedIndex);
}

m_IsEnabled = value;
m_ToggleButton.text = m_Text;
UpdateEnabledState();
}

/// <summary>Set the available options for the dropdown</summary>
public void SetOptions(string[] newOptions)
{
m_Options.Clear();
if (newOptions != null)
m_Options.AddRange(newOptions);

if (m_SelectedIndex >= m_Options.Count)
m_SelectedIndex = 0;
}

/// <summary>Set the selected indices for multi-select</summary>
public void SetSelectedIndices(int[] indices)
{
m_SelectedIndices.Clear();
if (indices != null)
{
foreach (int index in indices)
{
if (index >= 0 && index < m_Options.Count)
{
m_SelectedIndices.Add(index);
}
}
}
selectionChanged?.Invoke(GetSelectedIndices());
}

/// <summary>Toggle selection of a specific index</summary>
public void ToggleSelection(int index)
{
if (index >= 0 && index < m_Options.Count)
{
if (m_SelectedIndices.Contains(index))
{
m_SelectedIndices.Remove(index);
}
else
{
m_SelectedIndices.Add(index);
}
selectionChanged?.Invoke(GetSelectedIndices());
}
}

/// <summary>Check if an index is selected</summary>
public bool IsSelected(int index)
{
return m_SelectedIndices.Contains(index);
}

/// <summary>Set the enabled state</summary>
public new void SetEnabled(bool enabled)
{
if (enabled != m_IsEnabled)
{
m_IsEnabled = enabled;
UpdateEnabledState();
toggleChanged?.Invoke(enabled);
}
}

void OnToggleClicked()
{
SetEnabled(!m_IsEnabled);
}

void UpdateEnabledState()
{
if (m_IsEnabled)
{
AddToClassList(k_EnabledClass);
}
else
{
RemoveFromClassList(k_EnabledClass);
}

MarkDirtyRepaint();
}

void ShowCustomDropdown()
{
var menu = new GenericMenu();

for (int i = 0; i < m_Options.Count; i++)
{
int index = i;
string optionName = m_Options[i];
bool isSelected = m_SelectedIndices.Contains(index);

menu.AddItem(new GUIContent(optionName), isSelected, () => {
ToggleSelection(index);
});
}

var rect = this.worldBound;
menu.DropDown(rect);
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading