Added function to update component on an entity.