Add API for changing a player with auth's identifier#176
Conversation
PR Review: Add API for changing a player with auth's identifierThe overall structure is clean and consistent with existing patterns. One issue worth addressing: 🟡 Potential Bugs or Issues
// SessionManager.cs - current
public void HandleIdentifierUpdated(PlayerAuthChangeIdentifierResponse res)
{
Talo.CurrentAlias = res.alias;
SetIdentifierPlayerPref();
}
Suggested fix — preserve the existing player reference if the response omits it: public void HandleIdentifierUpdated(PlayerAuthChangeIdentifierResponse res)
{
var existingPlayer = Talo.CurrentAlias.player;
Talo.CurrentAlias = res.alias;
if (Talo.CurrentAlias.player == null)
{
Talo.CurrentAlias.player = existingPlayer;
}
SetIdentifierPlayerPref();
}Code Quality, Performance, Security, Backwards CompatibilityNo issues found. The |
No description provided.