[unity] Added warning when 'CanvasGroup compatible' is enabled at Material and SkeletonGraphic 'PMA Vertex Colors' is incorrectly enabled as well.

This commit is contained in:
Harald Csaszar 2023-08-21 17:49:31 +02:00
parent 597af11179
commit 4239912146
2 changed files with 9 additions and 1 deletions

View File

@ -102,6 +102,10 @@ namespace Spine.Unity {
+ "a) disable 'CanvasGroup Compatible' at the Material or\n"
+ "b) enable 'Canvas Group Tint Black' at the SkeletonGraphic component under 'Advanced'.\n"
+ "You may want to duplicate the 'SkeletonGraphicTintBlack' material and change settings at the duplicate to not affect all instances.";
public static readonly string kCanvasGroupCompatiblePMAVertexMessage =
"\nWarning: 'CanvasGroup Compatible' is enabled at the Material and 'PMA Vertex Colors' is enabled at SkeletonGraphic!\n\nPlease\n"
+ "a) disable 'CanvasGroup Compatible' at the Material or\n"
+ "b) disable 'PMA Vertex Colors' at the SkeletonGraphic component under 'Advanced'.";
public static bool IsMaterialSetupProblematic (SkeletonRenderer renderer, ref string errorMessage) {
Material[] materials = renderer.GetComponent<Renderer>().sharedMaterials;
@ -162,6 +166,10 @@ namespace Spine.Unity {
isProblematic = true;
errorMessage += kCanvasGroupCompatibleDisabledMessage;
}
if (settings.pmaVertexColors == true && IsCanvasGroupCompatible(material)) {
isProblematic = true;
errorMessage += kCanvasGroupCompatiblePMAVertexMessage;
}
}
return isProblematic;
}

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.spine-unity",
"displayName": "spine-unity Runtime",
"description": "This plugin provides the spine-unity runtime core.",
"version": "4.1.16",
"version": "4.1.17",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",