I'm trying to start real-time session in Unity. And i have two issues:
1. When i launch 2 copies of the game on the same Mac, i don't get "MatchFoundMessage" after calling MatchmakingRequest. I get the MatchmakingRequest response and it says HasErrors = false. If i try it with Unity copy of the app + Adobe AIR (as3) copy of the app on the same Mac - it works, i get the MatchFoundMessage! So what can be the point with 2 Unity copies? I start one copy using Terminal, second one in Unity.
2. I tried this on different computers. I launch one app copy on Window computer, second one in Unity on Mac. After MatchmakingRequest i get MatchFoundMessage. Host, Port, Token and MatchId are OK. So using this data i do:
and nothing happens. OnRTReady and OnPlayerConnectedToGame functions keep not called.
Best Answer
R
Rustam Mamedov
said
about 6 years ago
Hi Sean,
I found the cause of the problem. I wrote "accesstoken" word instead of "accessToken" when configuring RTSession. So it was my mistake. Thank you for trying help!
For issue [1], are you doing a device connect request? If this is the case, running two apps on the same machine would end up logging you in twice for the same player, so no new player would enter the match. For the second issue, i would need more information. Do you have a script attached to the match that might be causing the match not to start? Could you send on the rest of the script so i can see that the callbacks are working correctly?
The other thing you could try is to setup the RT demo game and get that working, then work backwards from there. If i know that the demo is working correctly or not it gives me some place to start from. I would also need to see where StartNewRTSession() is being called from.
Thanks, Sean
R
Rustam Mamedov
said
about 6 years ago
Hi Sean,
thank you for answers.
For [1]. Strange, but it works now. I'm using username/password authentication. Ok, it works and that's good.
For [2]. I'm doing my sample reading your RT demo. StartNewRTSession() is being called in onMatchFoundMessage() function. I want tot start the RT as soon as a match found. And as you can see in attached 1.jpg StartNewRTSession() works (i see debug message). After that i get another message "Starting session". And that's all. I added my LobbyManager and GameSparksManager to the zip.
If you get the 'Session Started' message you are good-to-go! The RT session is running. The thing is that if you call the StartNewSession() method when you get the match found message you cant guarantee the other player will start at the same time as you. You can code around that of course, but it looks to me like everything is working if you get the 'Session Started' message.
Sean
R
Rustam Mamedov
said
about 6 years ago
Hi Sean, I get "Starting session", not "Seestion Started". As I can see this is debug log in GameSparksRTUnity.cs in Connect() method. After that i see no messages.
Rustam.
R
Rustam Mamedov
said
about 6 years ago
Any ideas? Here is a simple test project https://goo.gl/oDm0GS After initialization you can see a button that should find an opponent and start real-time session. But nothing happens after gameSparksRTUnity.Connect ();
Rustam.
Customer Support
said
about 6 years ago
Hey Rustam,
Sorry for the delay getting back to you. There seems to be something wrong with the 'GameSparks' scene in that project link. I can open it in order to launch the game. Could you try zipping it again and sending it on?
Thanks, Sean
R
Rustam Mamedov
said
about 6 years ago
Answer
Hi Sean,
I found the cause of the problem. I wrote "accesstoken" word instead of "accessToken" when configuring RTSession. So it was my mistake. Thank you for trying help!
Rustam Mamedov
Hi!
I'm trying to start real-time session in Unity. And i have two issues:
1. When i launch 2 copies of the game on the same Mac, i don't get "MatchFoundMessage" after calling MatchmakingRequest. I get the MatchmakingRequest response and it says HasErrors = false. If i try it with Unity copy of the app + Adobe AIR (as3) copy of the app on the same Mac - it works, i get the MatchFoundMessage! So what can be the point with 2 Unity copies? I start one copy using Terminal, second one in Unity.
2. I tried this on different computers. I launch one app copy on Window computer, second one in Unity on Mac. After MatchmakingRequest i get MatchFoundMessage. Host, Port, Token and MatchId are OK. So using this data i do:
and nothing happens. OnRTReady and OnPlayerConnectedToGame functions keep not called.
Hi Sean,
I found the cause of the problem. I wrote "accesstoken" word instead of "accessToken" when configuring RTSession. So it was my mistake. Thank you for trying help!
Thanks,
Rustam.
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
For issue [1], are you doing a device connect request? If this is the case, running two apps on the same machine would end up logging you in twice for the same player, so no new player would enter the match.
For the second issue, i would need more information. Do you have a script attached to the match that might be causing the match not to start? Could you send on the rest of the script so i can see that the callbacks are working correctly?
The other thing you could try is to setup the RT demo game and get that working, then work backwards from there. If i know that the demo is working correctly or not it gives me some place to start from.
I would also need to see where StartNewRTSession() is being called from.
Thanks,
Sean
Rustam Mamedov
Hi Sean,
thank you for answers.
For [1]. Strange, but it works now. I'm using username/password authentication. Ok, it works and that's good.
For [2]. I'm doing my sample reading your RT demo. StartNewRTSession() is being called in onMatchFoundMessage() function. I want tot start the RT as soon as a match found. And as you can see in attached 1.jpg StartNewRTSession() works (i see debug message). After that i get another message "Starting session". And that's all. I added my LobbyManager and GameSparksManager to the zip.
Thanks!
Customer Support
If you get the 'Session Started' message you are good-to-go! The RT session is running.
The thing is that if you call the StartNewSession() method when you get the match found message you cant guarantee the other player will start at the same time as you.
You can code around that of course, but it looks to me like everything is working if you get the 'Session Started' message.
Sean
Rustam Mamedov
I get "Starting session", not "Seestion Started". As I can see this is debug log in GameSparksRTUnity.cs in Connect() method. After that i see no messages.
Rustam.
Rustam Mamedov
Here is a simple test project https://goo.gl/oDm0GS
After initialization you can see a button that should find an opponent and start real-time session. But nothing happens after
gameSparksRTUnity.Connect ();
Rustam.
Customer Support
Hey Rustam,
Sorry for the delay getting back to you.
There seems to be something wrong with the 'GameSparks' scene in that project link. I can open it in order to launch the game.
Could you try zipping it again and sending it on?
Thanks,
Sean
Rustam Mamedov
Hi Sean,
I found the cause of the problem. I wrote "accesstoken" word instead of "accessToken" when configuring RTSession. So it was my mistake. Thank you for trying help!
Thanks,
Rustam.
Customer Support
No Problem Rustam.
Glad to hear it is working.
Sean
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics