Skip to content

Fixed tooltip not showing on labels in ShaderGraphs #5877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed missing DisallowMultipleComponent annotations in HDAdditionalReflectionData and HDAdditionalLightData (case 1365879).
- Fixed ambient occlusion strenght incorrectly using GTAOMultiBounce
- Fixed range compression factor being clamped. (case 1365707)
- Fixed tooltip not showing on labels in ShaderGraphs (1358483).

## [13.0.0] - 2021-09-01

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ protected void AddProperty<Data>(GUIContent displayName, Func<Data> getter, Acti

switch (getter())
{
case bool b: elem = new Toggle { value = b, tooltip = displayName.tooltip } as BaseField<Data>; break;
case int i: elem = new IntegerField { value = i, tooltip = displayName.tooltip, isDelayed = true } as BaseField<Data>; break;
case float f: elem = new FloatField { value = f, tooltip = displayName.tooltip, isDelayed = true } as BaseField<Data>; break;
case Enum e: elemEnum = new EnumField(e) { value = e, tooltip = displayName.tooltip }; break;
case bool b: elem = new Toggle { value = b } as BaseField<Data>; break;
case int i: elem = new IntegerField { value = i, isDelayed = true } as BaseField<Data>; break;
case float f: elem = new FloatField { value = f, isDelayed = true } as BaseField<Data>; break;
case Enum e: elemEnum = new EnumField(e) { value = e }; break;
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.");
}

if (elem != null)
{
context.AddProperty<Data>(displayName.text, indentLevel, elem, (evt) =>
context.AddProperty<Data>(displayName.text, displayName.tooltip, indentLevel, elem, (evt) =>
{
if (Equals(getter(), evt.newValue))
return;
Expand All @@ -66,7 +66,7 @@ protected void AddProperty<Data>(GUIContent displayName, Func<Data> getter, Acti
}
else
{
context.AddProperty<Enum>(displayName.text, indentLevel, elemEnum, (evt) =>
context.AddProperty<Enum>(displayName.text, displayName.tooltip, indentLevel, elemEnum, (evt) =>
{
if (Equals(getter(), evt.newValue))
return;
Expand Down