Skip to content

Commit

Permalink
[unity] Fixed keyword not being set for SkeletonGraphicRenderTexture …
Browse files Browse the repository at this point in the history
…quad material. See #2520.
  • Loading branch information
HaraldCsaszar committed May 7, 2024
1 parent 773d27c commit a177da9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -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
Expand Down Expand Up @@ -64,7 +65,7 @@ Material:
m_Ints: []
m_Floats:
- _BumpScale: 1
- _CanvasGroupCompatible: 0
- _CanvasGroupCompatible: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DarkColorAlphaAdditive: 0
Expand Down
Expand Up @@ -89,8 +89,10 @@ public struct TextureMaterialPair {
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 () {
Expand Down

0 comments on commit a177da9

Please sign in to comment.