As mentioned at the start of the chapter, game objects are used when more advanced functionality is required of an entity, for example, if an entity needs to be bound to the network.
There are two ways of implementing game objects, one being by registering the entity directly via IGameObjectSystem::RegisterExtension
(and thereby having the game object automatically created on entity spawn), and the other is by utilizing the IGameObjectSystem::CreateGameObjectForEntity
method to create a game object for an entity at runtime.
It is possible to extend game objects by creating extensions, allowing the developer to hook into a number of entity and game object callbacks. This is, for example, how actors are implemented by default, something we'll be covering in Chapter 5, Creating Custom Actors.
We will be creating our game object extension in C++. The CryMono entity we created earlier in the chapter was made possible by a custom game object extension contained...