Customizing the Player

Adding custom behavior to the Player

The Player that comes with your copy of Gameface allows for some level of customization. You can find the Player.exe inside the CoherentSample/Apps directory.

You can modify the settings of the Player executable that comes with your copy of Gameface. This functionality is useful for testing various features that require additional implementation on the engine side of your game – such as Localization.

The custom settings are loaded through a Dynamic Link Library, called PlayerOverrides.dll. Gameface comes with a PlayerOverrides Microsoft Visual Studio solution file (located under CoherentSample/Apps/ PlayerOverrides) that will allow you to automatically generate and use this dynamic library with the desired settings.

Changing the Root Directory

Before you can use the solution file to create, or make changes to the PlayerOverrides.dll, you first need to properly set up the root directory of Unreal Engine (or your Game project, depending on where your Gameface plugin resides).

  • Open your project in Microsoft Visual Studio and navigate to the Property Manager.
  • Open the PlayerOverrides Property Sheet.
  • Double-click on the PlayerOverrides Property Sheet and open the User Macros menu.
  • From there you should set:
    • The EngineDir to point to the “Engine” directory of your Unreal Engine installation.
    • The GameRootDir to point to the root of your game project (the one that contains your .uproject file)

Below you can see an example of how these properties might look like after implementing this change.

Implementing Changes

  1. Open the PlayerOverrides.sln file. The file is located in the CoherentSample/Apps/PlayerOverrides directory.
  2. Use the CohtmlOverrides interface in the PlayerOverrides.cpp file to achieve your desired behavior.
  3. Compile and start the project.
  4. The solution will build and copy the PlayerOverrides.dll to the directory of your Player.exe.

Saving and Removing Modifications

Preserving or applying different sets of overrides for different cases is just a matter of placing different PlayerOverrides.dll files next to your Player.exe.