/// <inheritdoc />
        public void DespawnComponent(GameObject gameObject, string prefabName)
        {
            var name = GetPrefabsGauge(prefabName);

            metrics.DecrementGauge(name);

            prefabFactory.DespawnComponent(gameObject, prefabName);
        }
        private void DestroyEntity(IEntityObject entity)
        {
            var disposable = entity as IDisposable;

            if (disposable != null)
            {
                disposable.Dispose();
            }

            entityComponentInterestOverridesUpdater.RemoveEntity(entity);

            universe.Remove(entity.EntityId);

            prefabFactory.DespawnComponent(entity.UnderlyingGameObject, entity.PrefabName);
        }