Using the C# SDK Samples

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

Introduction

The samples solution is split into several projects. Common is a library that is shared between all of the sample projects which 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 relevant options such as your product id and sandbox id have been set in Options.cs, or make sure you are passing them into the application as arguments. The list of usable arguments are as follows:

  • --productid

  • --sandboxid

  • --deploymentid

  • --clientid

  • --clientsecret

  • --id

  • --token

Id and token must be set for the developer login type.

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