I am basically using the code from the SFS Island Demo. In the "networkcontroller" in the function :
void Start() {
DontDestroyOnLoad(this);
Application.runInBackground = true; // Let the application be running whyle the window is not active.
smartFoxClient = GetClient();
if (smartFoxClient==null) {
Application.LoadLevel("LoginScreen");
return;
}
SubscribeEvents();
started = true;
smartFoxClient.JoinRoom("JamesIsland");
}
I am going to a "different" scene in the game, then I need to return to the main world. Obviously the Start is fired again so I put a DontDestroyOnLoad(this); so I don't lose my info.
The issue is, now it is trying to call the smartFoxClient.JoinRoom("JamesIsland"); with the same already logged in user, which causes an error. Is there any way to "check" to see if I am already logged into the room?
Thanks!
Check to see if already in Room?
-
- Posts: 61
- Joined: 16 Jan 2009, 14:48
Return to “.Net / Unity3D API”
Who is online
Users browsing this forum: No registered users and 15 guests