mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-17 20:41:38 +08:00
[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:
parent
597af11179
commit
4239912146
@ -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;
|
||||
}
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user