Using the C# SDK Samples

A guide on how to use the EOS C# SDK samples.

Introduction

The solution is split into several projects.

Common is a library that contains the SDK code and other useful shared functionality.

SimpleAuth is a WPF application that demonstrates how to perform authentication and presence related functions for the logged-in user.

SimpleOverlayPurchasing is a managed DirectX11 application that demonstrates how to initiate and complete the purchasing flow by utilizing the in-game overlay.

Before You Begin

Make sure you have correctly set the values associated with your application in Options.cs. The required options are:

  • ProductId

  • SandboxId

  • DeploymentId

  • ClientId

  • ClientSecret

If you don't yet have the values for these options, you can learn more about them at Developer Portal.

You can also set the LoginType. Use of the Id and Token fields differ based on the login type. For more information, see Auth Credentials and Auth Interface.

The sample application uses Epic Account Services to authenticate the local user for demonstration purposes. This requires that the Client Credentials used to initialize the SDK have been assigned to an Application used for Epic Account Services.

The demonstrated SDK functionality can be used with any of the supported identity providers for user authentication.

Main

Logging In

On the sign-in screen, you can select from several login types. AccountPortal is the simplest to get started with.

EOSCSharpSample_01.png

Viewing Your Presence

Once signed in, you will be presented with a page showing your current presence.

EOSCSharpSample_Presence.png

Changing Your Presence

The page also contains a form that you can fill in to resync your presence with the server. It contains fields for your current online status, your rich text, and a collection of data entries. Submitted changes may take a few seconds to reflect in your current presence.

EOSCSharpSample_Presence_2.png

OverlayPurchasing

Before You Begin

In order for the overlay to work, you must have done one of the following: + Installed the Epic Games Launcher and ran it for the first time. + Downloaded the EOSOVH dll file and set the registry key HKEY_CURRENT_USER\Software\Epic Games\EOS\OverlayPath to the directory of where the dll resides.

Initiating the Purchasing Flow

The sample will automatically proceed with logging in and the necessary ecom functions in order to launch the overlay into the purchasing flow. Keep an eye on the output to ensure there are no problems.

EOSCSharpSample_OverlayPurchasing.png