Edit

Share via


C#

C# Image

This C# SDK is used in the .NET environment. It's built primarily for game services, tools, and applications designed to run on Cloud, Windows, and any other platform supported by .NET.

This SDK is generated using our open-sourced tool—SDKGenerator. We generally build SDKs every other week to stay current with the latest API changes.

Key components in this SDK

This C# PlayFab SDK package consists of three different API combinations.

  1. PlayFabClientSDK - Contains only client libraries and is designed for integration in your game client.
  2. PlayFabServerSDK - Contains only server and admin APIs and is designed for integration in your custom logic server or build process.
  3. PlayFabSDK - Contains all APIs in one SDK (client, server, and admin) and a unit-test project.

When not to use this SDK

The C# PlayFab SDK shouldn't be used if there's a more specific SDK that is suited for your project.

Specific PlayFab SDK is available for:

For a full list of the different PlayFab SDKs, see Azure PlayFab SDK.

Using the SDK

This native C# project can be used in these two ways.

  • Admin tools for maintaining your game

    • Usually, you want to make synchronous calls back-to-back.
    • Each API call locks the program while it's executing, but that's not an issue for this type of program.
    • See the comment about loginTask.Wait() in the example code. This synchronizing pattern is common for API calls from tools.
  • An actual game coded in native C#

Add SDK to your project

Alternatively, you can install the NuGet package into your Visual Studio project using the NuGet Package Manager. For instructions, see Install and use a package in Visual Studio. For more information, see Getting started with NuGet.