private void DestroyHitboxRender() { if (hitboxRender != null) { Object.Destroy(hitboxRender); hitboxRender = null; } }
private void CreateHitboxRender() { DestroyHitboxRender(); if (GameManager.instance.IsGameplayScene()) { hitboxRender = new GameObject().AddComponent <HitboxRender>(); } }