[unity] Make SkeletonRenderer invalid when destroying.

This commit is contained in:
pharan 2017-08-23 18:34:05 +08:00
parent 50730c7a5c
commit a96d92d27d
2 changed files with 2 additions and 1 deletions

View File

@ -133,7 +133,7 @@ namespace Spine.Unity.Modules {
} }
Applied = false; Applied = false;
skeletonRenderer.LateUpdate(); if (skeletonRenderer.valid) skeletonRenderer.LateUpdate();
} }
public void GetTexture () { public void GetTexture () {

View File

@ -147,6 +147,7 @@ namespace Spine.Unity {
void OnDestroy () { void OnDestroy () {
rendererBuffers.Dispose(); rendererBuffers.Dispose();
valid = false;
} }
public virtual void ClearState () { public virtual void ClearState () {