C# Blank Template

The blank template is designed for those situations when you want to start a project from scratch. This template only includes an FPS counter and a basic setup of a CryEnginePlugin which can be used as a starting point for initializing your project. However, if you are not familiar with programming in C# in CRYENGINE, then we recommend that you first start off with another one of the available templates.

FPS-Counter

The FPS counter is rendered by using the CryEngine.UI. The Canvas is set up by the CreateUI method. The Text component is added to the Canvas and placed in the correct position. In the OnUpdate method, the amount of frames that have passed are counted, and every second this gets written to the Text component and the count is reset to 0. The OnUpdate method is called every frame by the GameFramework, which is achieved by calling RegisterForUpdate in the constructor of the Game class.

The CreateUI and DestroyUI are subscribed to the engine reload event. This is required to handle cleaning up the UI when the C# plugins are reloaded, for example when a C# asset has been edited.