Browse Source

Bugfix: Fix texture not being assignable to a material

BearishSun 6 years ago
parent
commit
cec08388cd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/EditorManaged/Inspectors/MaterialInspector.cs

+ 1 - 1
Source/EditorManaged/Inspectors/MaterialInspector.cs

@@ -624,7 +624,7 @@ namespace bs.Editor
                 case ShaderParameterType.TextureCube:
                     RRef<SpriteTexture> spriteTex = material.GetSpriteTexture(shaderParam.name);
 
-                    if (spriteTex != null)
+                    if (spriteTex != null && spriteTex.IsLoaded)
                         guiElem.SpriteTextureRef = spriteTex;
                     else
                     {