mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 16:48:43 +08:00
One more adjustment to SkeletonRenderer.
This commit is contained in:
parent
663a241939
commit
1f13add101
@ -139,17 +139,22 @@ public class SkeletonRenderer : MonoBehaviour {
|
||||
}
|
||||
|
||||
public virtual void OnDestroy () {
|
||||
if (Application.isPlaying) {
|
||||
if (mesh1 != null) {
|
||||
if (mesh1 != null) {
|
||||
if (Application.isPlaying)
|
||||
Destroy(mesh1);
|
||||
mesh1 = null;
|
||||
}
|
||||
|
||||
if (mesh2 != null) {
|
||||
Destroy(mesh2);
|
||||
mesh2 = null;
|
||||
}
|
||||
else
|
||||
DestroyImmediate(mesh1);
|
||||
}
|
||||
|
||||
if (mesh2 != null) {
|
||||
if (Application.isPlaying)
|
||||
Destroy(mesh2);
|
||||
else
|
||||
DestroyImmediate(mesh2);
|
||||
}
|
||||
|
||||
mesh1 = null;
|
||||
mesh2 = null;
|
||||
}
|
||||
|
||||
private Mesh newMesh () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user