I want to connect in a login scene and then keep using that same connection in a game scene. This is done in the example by connecting using LoginController.cs and then handing off sfs to LobbyController.cs by doing:
Code: Select all
private SmartFox sfs;
void Awake() {
if (SmartFoxConnection.IsInitialized) {
sfs = SmartFoxConnection.Connection;
} else {
// stuff
}
// more stuff
}