Skip to main content
HyperX stores country and language on the user profile. Use them for operation content, notification language, and regional events.

Country and Language

Countries use ISO 3166-1 alpha-2 codes. Languages use two-letter ISO 639-1 codes.
var countries = await HyperX.Core.Region.Countries();
var detected = await HyperX.Core.Region.Detect();

var player = await HyperX.Core.Users.StartGuestSession(
    SystemInfo.deviceUniqueIdentifier,
    country: detected.Country,
    language: detected.Language
);
Detected values are not automatically saved to the account. Store them during signup or with Region.Update according to your game policy.
var current = await player.Region();
var updated = await player.UpdateRegion(
    country: "US",
    language: "en"
);

Server Time and SDK Info

var serverTime = await HyperX.Core.Utils.GetServerTime();
var sdkVersion = HyperX.Core.Utils.SdkVersion;
var runtime = HyperX.Core.Utils.RuntimeEnvironment;
Use server time for attendance, event deadlines, cooldowns, and other logic that should not trust the device clock.

Unity Save Path

string path = HyperX.Core.Utils.ResolvePersistentDataPath("saves/slot-1.json");
In Unity, this resolves under Application.persistentDataPath. In standard .NET runtimes, the input path is returned as-is.

Callback Style

SDK APIs are Task based. Use ToCallback when Unity code is easier to structure with callbacks.
HyperX.Core.Utils.ToCallback(
    player.Region(),
    region => Debug.Log(region.Country),
    error => Debug.LogWarning(error.Message)
);