protected override void OnDespawned() { //reset stuff here mRout = null; if (mTarget) { mTarget.Release(); mTarget = null; } headSpriteRender.gameObject.SetActive(false); headSpriteRender.sortingLayerName = mHeadDefaultSort; headSpriteRender.sortingOrder = mHeadDefaultOrder; }
void OnDragEnd() { if (drag.isDelete) { entity.Release(); } }