mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed mask material generation issuing incorrect warnings when only animation sets visible attachments. Applying initial animation before mask material generation. Closes #2363.
This commit is contained in:
parent
4cc4f15f47
commit
19d627592d
@ -310,6 +310,12 @@ namespace Spine.Unity.Editor {
|
|||||||
if (oldAnimationState != null) {
|
if (oldAnimationState != null) {
|
||||||
stateComponent.AnimationState.AssignEventSubscribersFrom(oldAnimationState);
|
stateComponent.AnimationState.AssignEventSubscribersFrom(oldAnimationState);
|
||||||
}
|
}
|
||||||
|
if (stateComponent != null) {
|
||||||
|
// Any set animation needs to be applied as well since it might set attachments,
|
||||||
|
// having an effect on generated SpriteMaskMaterials below.
|
||||||
|
stateComponent.AnimationState.Apply(component.skeleton);
|
||||||
|
component.LateUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
#if BUILT_IN_SPRITE_MASK_COMPONENT
|
#if BUILT_IN_SPRITE_MASK_COMPONENT
|
||||||
SpineMaskUtilities.EditorAssignSpriteMaskMaterials(component);
|
SpineMaskUtilities.EditorAssignSpriteMaskMaterials(component);
|
||||||
|
|||||||
@ -176,7 +176,7 @@ namespace Spine.Unity.Editor {
|
|||||||
Material[] currentMaterials = meshRenderer.sharedMaterials;
|
Material[] currentMaterials = meshRenderer.sharedMaterials;
|
||||||
|
|
||||||
if (currentMaterials.Length == 0 || currentMaterials[0] == null) {
|
if (currentMaterials.Length == 0 || currentMaterials[0] == null) {
|
||||||
Debug.LogWarning("No materials found assigned at " + skeleton.name);
|
// Note: if no attachments are visible, no materials are set. This is a valid state.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "com.esotericsoftware.spine.spine-unity",
|
"name": "com.esotericsoftware.spine.spine-unity",
|
||||||
"displayName": "spine-unity Runtime",
|
"displayName": "spine-unity Runtime",
|
||||||
"description": "This plugin provides the spine-unity runtime core.",
|
"description": "This plugin provides the spine-unity runtime core.",
|
||||||
"version": "4.1.22",
|
"version": "4.1.23",
|
||||||
"unity": "2018.3",
|
"unity": "2018.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user