Appwrap issues, i dont get OnUserJoin/OnUserLeave Events and when i do Start game it also give me Stop game Event

0 votes

Im using Unity 4.6.3 and when on one user i create a room, and with another user i join the same room

and i dont get any OnUserJoin event and they are both inside the room and even when i leave the room i dont get OnLeaveRoom.

and when i start a game while two of them in the room i get onStartGame even and also OnStopGame Event,

whats going on? is there a problem with the SDK?
asked Aug 16, 2015 in AppWarp by moshe (10 points)

1 Answer

0 votes
Hi Moshe,

Can you share code snippets which you are using to initialise AppWarp? It will help us to debug the problem.

Also all the callbacks you listed in the question are notifications which will not come if client has not added notification listener or has not subscribed for the room. Please check if this is the case.

answered Aug 16, 2015 by rajeev.etc (1,660 points)
public class SC_MultiplayerTest : MonoBehaviour
    private string apiKey = "xxxxxxxxxxxxxxx";
    private string secretKey = "xxxxxxxxxxxxx";

    void OnDisable()
        SC_Listener_App42.onCreatedUserApp42 -= onCreatedUserApp42;
        SC_Listener_App42.OnExceptionFromApp42 -= OnExceptionFromApp42;
        SC_Listener_AppWarp.onConnectToAppWarp -= onConnectToAppWarp;
        SC_Listener_AppWarp.onDisconnectFromAppWarp -= onDisconnectFromAppWarp;
        SC_Listener_AppWarp.OnCreateRoomDone -= OnCreateRoomDone;
        SC_Listener_AppWarp.OnJoinToRoom -= OnJoinToRoom;
        SC_Listener_AppWarp.OnMatchedRooms -= OnGetMatchedRoomsDone;
        SC_Listener_AppWarp.onGetLiveRoomInfo -= OnGetLiveRoomInfo;
        SC_Listener_AppWarp.OnUserJoinRoom -= OnUserJoinRoom;
        SC_Listener_AppWarp.OnUserLeftRoom -= OnUserLeftRoom;
        SC_Listener_AppWarp.OnStartGameDone -= OnStartGameDone;
        SC_Listener_AppWarp.OnStartGameDone -= OnStopGameDone;
    void Start ()
        //Init User
        //Init Server

    public void OnUserJoinRoom(RoomData eventObj, string _UserName)
        Debug.Log ("OnUserJoinRoom" + " " + eventObj.getRoomOwner () + " User connected" + userName);

public class SC_Listener_AppWarp : ConnectionRequestListener, LobbyRequestListener, ZoneRequestListener, RoomRequestListener, ChatRequestListener, UpdateRequestListener, NotifyListener, TurnBasedRoomListener
    public static event UserNotifiersFromRoom OnUserJoinRoom;

    public void onUserJoinedRoom(RoomData eventObj, string _UserName)
        if (OnUserJoinRoom != null)
            OnUserJoinRoom(eventObj, _UserName);


what i do is:
1. Create user
2. Connect to Appwrap
3. Search if there is a room Availible
3a. If there is a room Availible i join it
3b. If there is no room i create one and join it

4. Create a new user on another instance
5. Connect to appwrap with the other instance
6. Search for avalible room and join it (joined the previous room that was created with the first user)
i get no notification of the user join.

i do getliveinfo function
and i see there is 2 players inside the room so i start game
and when i start the game i get ongamestart and then right after ongamestop

most of the functions works
i didnt put down the whole scripts because there is alot of code

i also have the update function with this line of code

    void Update()
Can you cross check, if you have not subscribed for the room? In case you have not subscribed the room then subscribe the room using SubscribeRoom( api and try.
Let me know if this is not the case.
the subscription did help now i get onuserjoined and on user left thank you, but
still remain one problem.
when i do start game i get onstartgame and onStopGame events why is that?
event after event etc
Can you please share the script files that have AppWarp related codes on It will help to debug the problem.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on