Fixes and Account Removal
Objectives: Set up scene navigation, improve account lifecycle flows, and fix initial authentication bugs.
Centralized Scene Management: Created LoadLevel.cs to consolidate all scene transitions (ServerSelect, LoginScreen, MainMenu, Lobby, GameLevel1).
Account Removal Flow: Added RemoveAccount.cs under the Main Menu UI. On user confirmation, it calls AuthenticationService.DeleteAccountAsync() and then invokes LoadLevel.LoadLoginScreen()
Bug Fixes & Refinements: Updated scene manager calls, integrated the account-deletion API, and squashed initial login/signup issues (auto-fill, post-signup flow).
Lobby Integration: Enhanced LobbyManager.cs with a dropdown allowing players to select which lobby (room) to join directly from the main menu.
// LoadLevel.cs
using Photon.Pun;
public static class LoadLevel
{
public static void LoadServerSelect() => PhotonNetwork.LoadLevel(0);
public static void LoadLoginScreen() => PhotonNetwork.LoadLevel(1);
public static void LoadMainMenu() => PhotonNetwork.LoadLevel(2);
public static void LoadLobby() => PhotonNetwork.LoadLevel(3);
public static void LoadGameLevel1() => PhotonNetwork.LoadLevel(4);
}
Related games implementation features and practices
- Fortnite: Uses a centralized level-loading system and seamless account linking, inspiring our LoadLevel abstraction.
- Apex Legends: Provides an in-settings account deletion option; our RemoveAccount popup mirrors that user-friendly confirmation flow.
Analysis of implementation
- Metrics Tracked:
- - Scene-load success/failure counts (logged in console).
- - Account deletion successes vs. exceptions from
AuthenticationService.DeleteAccountAsync(). - - Lobby join-dropdown selection accuracy and error rates.
Results and Feedback on the implementation
- Consistent Navigation: All transitions now route through LoadLevel.cs, cutting code duplication and easing future scene-flow changes.
- Account Removal: RemoveAccount.cs confirmation and subsequent deletion work reliably; users return to login on success.
- Bug Resolution: Initial authentication bugs (auto-fill failures, post-signup hiccups) have been addressed; flows now complete without manual restarts.
- User Requests: Testers asked for an “cancel” option after deletion consider a short grace period before finalizing account removal.
- Next Steps: Add "cancle" option. Add error-message detail, and add visual thumbnails to the lobby dropdown for better room selection.
References
- Photon PUN 2 Documentation – Level Loading Guide:https://doc.photonengine.com/pun/current/demos-and-tutorials/pun-basics-tutorial/gamemanager-levels
- Unity Authentication Service – DeleteAccountAsync API: https://docs.unity.com/ugs/manual/authentication/manual/delete-accounts
- Unity Manual – Scene Management: https://docs.unity3d.com/6000.1/Documentation/ScriptReference/SceneManagement.SceneManager.html
Comments
Post a Comment