SDKs code references for UE4
Easily embed Xsolla services with this ready-to-use libraries for UE4 applications and games.
|
The SDK consists of the following parts:
To send requests to Xsolla servers and receive responses, the SDK provides the UXsollaStoreSubsystem, UXsollaLoginSubsystem and UXsollaInventorySubsystem classes. If you want to implement your own logic for buying items or inventory management, and don’t want to write boilerplate code for API calls, these classes are a good place to start.
The UXsollaLoginSubsystem class includes methods to implement the following features:
The UXsollaStoreSubsystem class includes methods to implement the following features:
The UXsollaInventorySubsystem class includes methods to implement the following features:
The UXsollaStoreSubsystem and UXsollaLoginSubsystem are wrapper classes for the standard IHttpRequest class. Since the methods for API calls initiate asynchronous requests to the Xsolla servers, they use delegates as parameters. Delegates are called when a response is received from the server.
In addition to methods for calling the API, the SDK contains data and classes for making requests to the API and receiving a response.
Example:
The demo project represents one of the possible logics for the login system, inventory, and in-game store based on Xsolla products. The demo uses the preset project in Publisher Account with a fully configured in-game store.
You can use the demo project in two ways:
To try the demo, launch the demo map from the Content Browser > Xsolla Content > Maps
directory.
See the SDK documentation to learn more.
Most of the code in the demo project is the ordinary widget blueprints that use the SDK:
Page controllers.
Example:
The W_LoginDemo
manages the user's login page. It determines whether the user is authorized, and if not, it can display a sign-up page or a new user registration page.
Blueprints for UI building and managing.
Example:
The W_CartPanel
builds a page with information about the cart data (e.g., the number of items to purchase) and counts and shows the total purchase price, etc.