Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Removing dont destroy on load (#52)
Browse files Browse the repository at this point in the history
* Removing Dont Destroy on Load in UserProfile
  • Loading branch information
MSFT-Heba authored May 16, 2017
1 parent 0c615fe commit 24ca78b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Assets/Xbox Live/Scripts/UserProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,23 @@ public void Awake()
if (!instance)
{
instance = this;
XboxLiveUser.SignOutCompleted += this.XboxLiveUserOnSignOutCompleted;
if (XboxLiveComponent.Instance.User != null && XboxLiveComponent.Instance.User.IsSignedIn)
{
instance.User = XboxLiveComponent.Instance.User;
this.StartCoroutine(this.LoadProfileInfo());
}
else
{
this.profileInfoPanel.SetActive(false);
}

this.Refresh();
}
else
{
Destroy(this.gameObject);
}

this.profileInfoPanel.SetActive(false);
XboxLiveUser.SignOutCompleted += this.XboxLiveUserOnSignOutCompleted;
DontDestroyOnLoad(this.gameObject);
this.Refresh();
}

public void Start()
Expand Down

0 comments on commit 24ca78b

Please sign in to comment.