diff --git a/UnitySDK/Assets/TiltBrush/Scripts/Gltf/GltfMaterialConverter.cs b/UnitySDK/Assets/TiltBrush/Scripts/Gltf/GltfMaterialConverter.cs index 5acce7a6..10edb301 100644 --- a/UnitySDK/Assets/TiltBrush/Scripts/Gltf/GltfMaterialConverter.cs +++ b/UnitySDK/Assets/TiltBrush/Scripts/Gltf/GltfMaterialConverter.cs @@ -256,6 +256,8 @@ private static Material LookUpGlobalMaterial(GltfMaterialBase gltfMaterial) { string alphaMode = gltfMat.alphaMode == null ? null : gltfMat.alphaMode.ToUpperInvariant(); switch (alphaMode) { + case null: + case "": case Gltf2Material.kAlphaModeOpaque: baseMaterial = gltfMat.doubleSided ? TbtSettings.Instance.m_BasePbrOpaqueDoubleSidedMaterial diff --git a/UnitySDK/Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs b/UnitySDK/Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs index 40045241..d5d9a7e2 100644 --- a/UnitySDK/Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs +++ b/UnitySDK/Assets/TiltBrush/Scripts/Gltf/ImportGltf.cs @@ -351,6 +351,12 @@ static bool GetBlocksVersion(string generatorString, out Version version) { version = new Version { major = 1, minor = 0 }; return true; } + // Likely it's "glTF 1-to-2 Upgrader for Google Blocks" + // No other Blocks version info, so assume 1.0 + if (generatorString.Contains("Google Blocks")) { + version = new Version { major = 1, minor = 0 }; + return true; + } version = new Version { major = 0, minor = 0 }; return false; }