Skip to content

Commit

Permalink
We are now avoiding using HighlightPlus.QualityLevel.Highest for the …
Browse files Browse the repository at this point in the history
…glow quality.

Highlight Plus version 21.0 creates strange drawing effects when this
option is used. We are using now HighlightPlus.QualityLevel.High instead,
which does not have this effect.

Unfortunately, that has another unwanted effect: For some of the edges
highlighted their highlighting appears at a different place than where
the edges are. This may happen when the edges are moved.

I contacted the developer of Highlight Plus about that problem.
The latter unwanted effect is neither good, but the former effect
is a showstopper. For the time being (until we here more from the developers),
we may need to live with the displaced highlights.

Note that reverting to the previous version of Highlight Plus, which did
not show the first effect (but actually the second one, too), is not
so simple. Only the latest version is available on the asset store.
And recovering the original version from the Git LFS is not so easy.
  • Loading branch information
koschke committed Sep 29, 2024
1 parent 1202cff commit 1adb5b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Assets/SEE/Game/Drawable/GameHighlighter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static HighlightEffect EnableGlowOutline(GameObject obj)
effect.outline = 1;
effect.outlineQuality = HighlightPlus.QualityLevel.Highest;
effect.outlineColor = Color.yellow;
effect.glowQuality = HighlightPlus.QualityLevel.Highest;
effect.glowQuality = Highlighter.DefaultGlowQuality;
effect.glow = 1.0f;
effect.glowHQColor = Color.yellow;
return effect;
Expand All @@ -40,7 +40,7 @@ public static HighlightEffect EnableGlowOverlay(GameObject obj)
effect.highlighted = true;
effect.previewInEditor = false;
effect.outline = 0;
effect.glowQuality = HighlightPlus.QualityLevel.Highest;
effect.glowQuality = Highlighter.DefaultGlowQuality;
effect.glow = 1.0f;
effect.glowHQColor = Color.yellow;
effect.overlay = 1.0f;
Expand Down
9 changes: 8 additions & 1 deletion Assets/SEE/Game/Highlighter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ namespace SEE.Game
/// </summary>
internal static class Highlighter
{
/// <summary>
/// The default quality level for the glow effect (<see cref="HighlightEffect.glowQuality"/>.
/// </summary>
/// <remarks>The value <see cref="HighlightPlus.QualityLevel.Highest"/> does not work
/// in Highlight Plus version 21.0 anymore.</remarks>
public const HighlightPlus.QualityLevel DefaultGlowQuality = HighlightPlus.QualityLevel.High;

/// <summary>
/// Whether or not the <paramref name="gameObject"/> should be highlighted.
/// </summary>
Expand Down Expand Up @@ -38,7 +45,7 @@ public static HighlightEffect GetHighlightEffect(GameObject gameObject)
highlight.outlineColor = inverted;
highlight.SetGlowColor(Color.yellow);
highlight.glow = 2;
highlight.glowQuality = HighlightPlus.QualityLevel.Highest;
highlight.glowQuality = DefaultGlowQuality;
highlight.effectGroup = TargetOptions.OnlyThisObject;
highlight.glowDownsampling = 1;
highlight.hitFxColor = inverted;
Expand Down

0 comments on commit 1adb5b0

Please sign in to comment.