[unity] Fixed keyword not being set for SkeletonGraphicRenderTexture quad material. See #2520.

This commit is contained in:
Harald Csaszar 2024-05-07 16:53:38 +02:00
parent 773d27c398
commit a177da9611
2 changed files with 6 additions and 3 deletions

View File

@ -11,7 +11,8 @@ Material:
m_Shader: {fileID: 4800000, guid: fa95b0fb6983c0f40a152e6f9aa82bfb, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_ValidKeywords:
- _CANVAS_GROUP_COMPATIBLE
m_InvalidKeywords:
- _ALPHAPREMULTIPLY_ON
- _USE8NEIGHBOURHOOD_ON
@ -64,7 +65,7 @@ Material:
m_Ints: []
m_Floats:
- _BumpScale: 1
- _CanvasGroupCompatible: 0
- _CanvasGroupCompatible: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DarkColorAlphaAdditive: 0

View File

@ -89,8 +89,10 @@ namespace Spine.Unity.Examples {
quadMesh.name = "RenderTexture Quad";
quadMesh.hideFlags = HideFlags.DontSaveInBuild | HideFlags.DontSaveInEditor;
if (quadMaterial == null)
if (quadMaterial == null) {
quadMaterial = new Material(Shader.Find("Spine/SkeletonGraphic"));
quadMaterial.EnableKeyword("_CANVAS_GROUP_COMPATIBLE");
}
}
void Reset () {