Skip to content

Commit

Permalink
Fixed missing texture on unscaled screens.
Browse files Browse the repository at this point in the history
  • Loading branch information
gasgiant committed Aug 9, 2021
1 parent 2e6ffed commit 0eb80e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Assets/Editor.meta

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

4 changes: 3 additions & 1 deletion Assets/MarkupAttributes/Editor/ExtraEditorStyles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ private static void InitializeHeaderStyles()
private static GUIStyle CreateBoxStyle(Texture2D texture)
{
var style = new GUIStyle(EditorStyles.helpBox);
style.normal.background = Texture2D.whiteTexture;
if (texture != null)
{
style.normal.background = texture;
style.normal.scaledBackgrounds = new Texture2D[] { texture };
}
return style;
}

Expand Down

0 comments on commit 0eb80e0

Please sign in to comment.