Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions Assets/Talo Game Services/Talo/Runtime/Talo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@ internal static void InvokeConnectionRestored()
public static PlayerAlias CurrentAlias
{
get => _currentAlias;
set => _currentAlias = value;
set
{
_currentAlias = value;

if (value?.player != null && (value.player.aliases?.Length ?? 0) == 0)
{
value.player.aliases = new[] { value };
}
}
}

public static Player CurrentPlayer
Expand All @@ -53,13 +61,13 @@ public static Player CurrentPlayer
set => _currentAlias.player = value;
}

private static CryptoManager _crypto;
private static readonly CryptoManager _crypto;
public static CryptoManager Crypto => _crypto;

private static ContinuityManager _continuity;
private static readonly ContinuityManager _continuity;
public static ContinuityManager Continuity => _continuity;

private static TaloSocket _socket;
private static readonly TaloSocket _socket;
public static TaloSocket Socket => _socket;

public static TaloSettings Settings => UnityEngine.Object.FindFirstObjectByType<TaloManager>().settings;
Expand Down
Loading