Resolve WES-117 "Persistent data handling"
This commit is contained in:
@@ -6,19 +6,13 @@ using UnityEngine;
|
||||
/// </summary>
|
||||
public class MainMenuScreen : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Referece to the userlist to check whether an user account is present
|
||||
/// </summary>
|
||||
public UserList userList;
|
||||
|
||||
/// <summary>
|
||||
/// Check on load whether a user is already present,
|
||||
/// if not load the UserCreationScreen scene so the user can create a new account
|
||||
/// </summary>
|
||||
void Awake()
|
||||
{
|
||||
userList.Load();
|
||||
if (!File.Exists(UserList.PATH) || userList.GetUsers().Count <= 0)
|
||||
if (!File.Exists(PersistentDataController.PATH) || UserList.GetUsers().Count <= 0)
|
||||
{
|
||||
SystemController.GetInstance().LoadNextScene("Accounts/Scenes/UserCreationScreen");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user