mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
Merge pull request #356 from Fenrisul/master
One more adjustment to SkeletonRenderer.
This commit is contained in:
commit
a903db829b
@ -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