Hi,
I have a singleton class called GlobalManager and I'd like to init Warpclient singleton in my GlobalManager singleton. Here's the initialization:
public static GlobalManager GetInstance()
{
if( !instance )
{
instance = (GlobalManager)Instantiate(Resources.Load("GlobalManager", typeof(GlobalManager)));
instance.listen = new Listener();
WarpClient.initialize(apiKey,secretKey);
instance.AddListeners();
WarpClient.GetInstance().Connect(username);
DontDestroyOnLoad(instance);
}
return instance;
}
Everything works fine, but when I leave and unsubscribe the room and then reload the scene by LoadScene(), I can't subscribe and join the room anymore, the WarpClient's state is "connected" however. Then, when I'm trying to disconnect, it disconnects successfully, but when I try to connect after that, it is not connecting and the WarpClient's state is always 1 ("connecting"). Can someone help me with this issue?