Pragma SDKs #
Pragma Engine provides SDKs for Unreal and Unity to enable seamless integration with the backend. Pragma tooling performs SDK generation based on the defined backend APIs and data types. SDK generation covers both built-in features provided by the engine, as well as custom features defined by game studios, providing a unified workflow for all backend development.
Overview #
Pragma utilizes protobuf as the interface definition language (IDL), enabling types to be defined once and cross-compiled into both game and backend source code.
SDK generation workflow #
The workflow for generating the SDK is summarized as follows:
- Define RPCs, requests, responses, notifications, and backend data types within Pragma.
- Run the SDK generation and update step to produce sources that provide API bindings and shared data types. The generated sources will be copied into the configured game project destination directory.
- Update game code to make API calls and reference shared data types within your game code. That’s it!
API development and iteration #
Pragma relies on strongly typed API and type definitions, which means recompilation is necessary when adding or updating APIs on the backend. Pragma provided APIs follow strict versioning and backwards compatibility semantics to ensure that APIs do not break across game client versions.
A common practice for early development is to set up simple key-value, workflows (for example based on serialized json). This provides quick, basic features such as data persistence without requiring heavy coordination between the game code and backend code. While this pattern is excellent for rapid iteration during early development, these patterns are not well suited for production, both for scale and maintenance considerations. Studios are encouraged to transition to strongly typed patterns as the game design and corresponding APIs solidify. This will prepare the game for a successful and maintainable production launch.
Unreal Specifics #
The Pragma SDK code generation tools produce Unreal-specific code that makes integration and use of Pragma APIs simple. The Pragma SDK is registered as an Unreal Plugin and SDK sources are checked in along with the game code. The pattern for initializing the SDK and calling backend services is the same for Pragma provided and custom services built by the studio, providing a unified workflow for all backend development.
Unity Specifics #
The Pragma SDK generation tools produce API bindings and generated C# data types. The Pragma SDK is registered as a Unity Plugin and SDK sources are checked in along with the game code. The pattern for initializing the SDK and calling backend services is the same for Pragma provided and custom services built by the studio, providing a unified workflow for all backend development.
SDK Compatibility #
The Pragma SDK has been compatibility tested with the following versions.
SDK | Verified Versions |
---|---|
Unreal Engine | 4.27, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5 |
Unity | 2021.3.16f1 |