Skip to content

Commit

Permalink
fix: base color warning should only be shown for transparent objects
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Oct 11, 2022
1 parent 52f3c1a commit 080e0c4
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -294,7 +294,9 @@ private void DrawGameObjectInfo(Material targetMaterial)
haveDrawnSomething = true;
}

if (targetMaterial.HasProperty("_Surface") && targetMaterial.GetFloat("_Surface") == 0 && targetMaterial.GetColor("baseColorFactor").a != 1)
if (targetMaterial.HasProperty("_Surface") && targetMaterial.GetFloat("_Surface") == 0 &&
targetMaterial.renderQueue <= (int) RenderQueue.AlphaTest + 50 &&
!Mathf.Approximately(targetMaterial.GetColor("baseColorFactor").a, 1))
{
DrawFixMeBox("Material is opaque but baseColorFactor has an alpha value != 1. This object might render unexpectedly in some viewers that blend results (e.g. AR, Babylon, Stager).", MessageType.Warning, () =>
{
Expand Down

0 comments on commit 080e0c4

Please sign in to comment.