From 2533468a0a7005948a17a60a2c6739d9bdf32427 Mon Sep 17 00:00:00 2001 From: tudor <7089284+tudddorrr@users.noreply.github.com> Date: Sun, 22 Sep 2024 22:00:45 +0100 Subject: [PATCH] add IdentifySteam helper function --- Packages/com.trytalo.talo/Runtime/APIs/PlayersAPI.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Packages/com.trytalo.talo/Runtime/APIs/PlayersAPI.cs b/Packages/com.trytalo.talo/Runtime/APIs/PlayersAPI.cs index 1d3c28a..af126bd 100644 --- a/Packages/com.trytalo.talo/Runtime/APIs/PlayersAPI.cs +++ b/Packages/com.trytalo.talo/Runtime/APIs/PlayersAPI.cs @@ -26,6 +26,18 @@ public async Task Identify(string service, string identifier) InvokeIdentifiedEvent(); } + public async Task IdentifySteam(string ticket, string identity = "") + { + if (string.IsNullOrEmpty(identity)) + { + await Identify("steam", ticket); + } + else + { + await Identify("steam", $"{identity}:{ticket}"); + } + } + public async Task Update() { var uri = new Uri($"{baseUrl}/{Talo.CurrentPlayer.id}");