Accessing Gameplay Framework Instances in Multiplayer
Unreal Engine comes with a set of built-in classes (the Gameplay Framework) that provide the common functionality that most games require, such as a way to define the game rules (game mode), a way to control a character (the player controller and pawn/character class), and so on. When an instance of a gameplay framework class is created in a multiplayer environment, we need to know if it exists on the server, the clients, or the owning client. With that in mind, an instance of the gameplay framework class will always fall into one of the following categories:
- Server Only: The instance will only exist on the server.
- Server and Clients: The instance will exist on the server and the clients.
- Server and Owning Client: The instance will exist on the server and the owning client.
- Owning Client Only: The instance will only exist on the owning client.
Take a look at the following diagram, which shows each category...