mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[unity] Fix BoundingBoxFollower release build bug.
This commit is contained in:
parent
04cabf7f3c
commit
3ae51cb0ec
@ -160,25 +160,25 @@ namespace Spine.Unity {
|
||||
}
|
||||
|
||||
void DisposeColliders () {
|
||||
#if UNITY_EDITOR
|
||||
var colliders = GetComponents<PolygonCollider2D>();
|
||||
if (colliders.Length == 0) return;
|
||||
|
||||
if (Application.isPlaying) {
|
||||
foreach (var c in colliders) {
|
||||
if (c != null)
|
||||
Destroy(c);
|
||||
if (Application.isEditor) {
|
||||
if (Application.isPlaying) {
|
||||
foreach (var c in colliders) {
|
||||
if (c != null)
|
||||
Destroy(c);
|
||||
}
|
||||
} else {
|
||||
foreach (var c in colliders)
|
||||
if (c != null)
|
||||
DestroyImmediate(c);
|
||||
}
|
||||
} else {
|
||||
foreach (var c in colliders)
|
||||
if (c != null)
|
||||
DestroyImmediate(c);
|
||||
foreach (PolygonCollider2D c in colliders)
|
||||
if (c != null)
|
||||
Destroy(c);
|
||||
}
|
||||
#else
|
||||
foreach (PolygonCollider2D c in colliderTable.Values)
|
||||
if (c != null)
|
||||
Destroy(c);
|
||||
#endif
|
||||
|
||||
slot = null;
|
||||
currentAttachment = null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user