Skip to content

Commit

Permalink
feat: send version info as an object instead of CSV string
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSchwert committed Sep 26, 2023
1 parent af89001 commit 35f91a7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Packages/Passport/Runtime/Scripts/Private/PassportImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class PassportImpl
private string? redirectUri = null;
private string unityVersion = Application.unityVersion;
private RuntimePlatform platform = Application.platform;
private string osVersion = SystemInfo.operatingSystem;

public PassportImpl(IBrowserCommunicationsManager communicationsManager)
{
Expand All @@ -38,7 +39,16 @@ public PassportImpl(IBrowserCommunicationsManager communicationsManager)
public async UniTask Init(string clientId, string environment, string? redirectUri = null, string? deeplink = null)
{
this.redirectUri = redirectUri;
var engineVersion = $"engine-unity-{unityVersion},platform-{platform}";
// var engineVersion = $"engine-unity-{unityVersion},platform-{platform}-{osVersion}";
var versionInfo = new Dictionary<string, string>
{
{ "engine", "unity" },
{ "engineVersion", unityVersion },
{ "platform", $"{platform}" },
{ "platformVersion", osVersion }
};
var engineVersion = JsonConvert.SerializeObject(versionInfo);

InitRequest request = new() { ClientId = clientId, Environment = environment, RedirectUri = redirectUri, EngineVersion = engineVersion };

string response = await communicationsManager.Call(
Expand Down

0 comments on commit 35f91a7

Please sign in to comment.