Each plug-in has to provide a single implementation of the Cry::IEnginePlugin interface. In our case, one was automatically created along with our project; see GamePlugin.cpp and GamePlugin.h.
Before we take a look at the default implementation, let's have a look at the bare minimum implementation of an engine plug-in:
Let's dissect this into parts:
Here we declare our game plug-in implementation as CGamePlugin, and inherit from Cry::IEnginePlugin. On startup, the engine parses the Game.cryproject file in your project directory, which in turn contains a path to our game plug-in DLL. Once the plug-in is loaded, an instance of our plug-in is created, invoking the CGamePlugin constructor.
Plug-ins utilize the engine's extension framework. This is a form of reflection allowing us to query implementations based on a specific interface. In this case, we indicate that our implementation implements Cry::IEnginePlugin.
In the next section, we need to provide our plug-in with a name and a GUID.