diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialExporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialExporter.cs index ca04a7d2b..3bc1861d3 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialExporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialExporter.cs @@ -263,6 +263,7 @@ namespace UniGLTF else if (renderMode == UniUnlitRenderMode.Cutout) { material.alphaMode = glTFBlendMode.MASK.ToString(); + material.alphaCutoff = m.GetFloat("_Cutoff"); } else { diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialImporter.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialImporter.cs index 5da283f84..790b0224c 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialImporter.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/MaterialImporter.cs @@ -116,6 +116,7 @@ namespace UniGLTF else if (x.alphaMode == "MASK") { UniUnlit.Utils.SetRenderMode(material, UniUnlit.UniUnlitRenderMode.Cutout); + material.SetFloat("_Cutoff", x.alphaCutoff); } else {