private void ProcessRemovedEntities()
        {
            Entities.With(removedEntitiesQuery).ForEach((ref GameObjectInitSystemStateComponent state) =>
            {
                Linker.UnlinkAllGameObjectsFromEntityId(state.EntityId);

                try
                {
                    gameObjectCreator.OnEntityRemoved(state.EntityId);
                }
                catch (Exception e)
                {
                    UnityEngine.Debug.LogException(e);
                }
            });

            EntityManager.RemoveComponent <GameObjectInitSystemStateComponent>(removedEntitiesQuery);
        }
        protected override void OnUpdate()
        {
            foreach (var entityId in entitySystem.GetEntitiesAdded())
            {
                workerSystem.TryGetEntity(entityId, out var entity);
                gameObjectCreator.OnEntityCreated(new SpatialOSEntity(entity, EntityManager), Linker);
            }

            var removedEntities = entitySystem.GetEntitiesRemoved();

            foreach (var entityId in removedEntities)
            {
                Linker.UnlinkAllGameObjectsFromEntityId(entityId);
            }

            Linker.FlushCommandBuffer();

            foreach (var entityId in removedEntities)
            {
                gameObjectCreator.OnEntityRemoved(entityId);
            }
        }