Skip to content

Commit 2cae061

Browse files
Revert: Fixed tooltip not showing on labels in ShaderGraphs #5877
1 parent 8b7b4e9 commit 2cae061

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111
- Fixed error in SSGI when disabling decals (case 1365521).
1212
- Fixed silhouette issue with emissive decals
1313
- Fixed range compression factor being clamped. (case 1365707)
14-
- Fixed tooltip not showing on labels in ShaderGraphs (1358483).
1514
- Fix API warnings in Matcap mode on Metal.
1615
- Fix D3D validation layer errors w.r.t shadow textures when an atlas is not used.
1716
- Fixed screen space reflection PBR Accumulation

com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SubTargetPropertyBlock.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,16 @@ protected void AddProperty<Data>(GUIContent displayName, Func<Data> getter, Acti
4545

4646
switch (getter())
4747
{
48-
case bool b: elem = new Toggle { value = b } as BaseField<Data>; break;
49-
case int i: elem = new IntegerField { value = i, isDelayed = true } as BaseField<Data>; break;
50-
case float f: elem = new FloatField { value = f, isDelayed = true } as BaseField<Data>; break;
51-
case Enum e: elemEnum = new EnumField(e) { value = e }; break;
48+
case bool b: elem = new Toggle { value = b, tooltip = displayName.tooltip } as BaseField<Data>; break;
49+
case int i: elem = new IntegerField { value = i, tooltip = displayName.tooltip } as BaseField<Data>; break;
50+
case float f: elem = new FloatField { value = f, tooltip = displayName.tooltip } as BaseField<Data>; break;
51+
case Enum e: elemEnum = new EnumField(e) { value = e, tooltip = displayName.tooltip }; break;
5252
default: throw new Exception($"Can't create UI field for type {getter().GetType()}, please add it if it's relevant. If you can't consider using TargetPropertyGUIContext.AddProperty instead.");
5353
}
5454

5555
if (elem != null)
5656
{
57-
context.AddProperty<Data>(displayName.text, displayName.tooltip, indentLevel, elem, (evt) =>
58-
{
57+
context.AddProperty<Data>(displayName.text, indentLevel, elem, (evt) => {
5958
if (Equals(getter(), evt.newValue))
6059
return;
6160

@@ -66,8 +65,7 @@ protected void AddProperty<Data>(GUIContent displayName, Func<Data> getter, Acti
6665
}
6766
else
6867
{
69-
context.AddProperty<Enum>(displayName.text, displayName.tooltip, indentLevel, elemEnum, (evt) =>
70-
{
68+
context.AddProperty<Enum>(displayName.text, indentLevel, elemEnum, (evt) => {
7169
if (Equals(getter(), evt.newValue))
7270
return;
7371

0 commit comments

Comments
 (0)