mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[unity] Fixed SkeletonGraphic Invalid AABB when instantiating in editor with no active attachments via drag and drop. Closes #2486.
This commit is contained in:
parent
3b8069f4b9
commit
3167747d73
@ -540,7 +540,7 @@ namespace Spine.Unity {
|
||||
if (mesh == null) {
|
||||
return false;
|
||||
}
|
||||
if (mesh.vertexCount == 0) {
|
||||
if (mesh.vertexCount == 0 || mesh.bounds.size == Vector3.zero) {
|
||||
this.rectTransform.sizeDelta = new Vector2(50f, 50f);
|
||||
this.rectTransform.pivot = new Vector2(0.5f, 0.5f);
|
||||
return false;
|
||||
@ -572,7 +572,7 @@ namespace Spine.Unity {
|
||||
}
|
||||
}
|
||||
|
||||
if (!anyBoundsAdded) {
|
||||
if (!anyBoundsAdded || combinedBounds.size == Vector3.zero) {
|
||||
this.rectTransform.sizeDelta = new Vector2(50f, 50f);
|
||||
this.rectTransform.pivot = new Vector2(0.5f, 0.5f);
|
||||
return false;
|
||||
|
||||
@ -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.38",
|
||||
"version": "4.1.39",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user