Why is CheckUserOnJoin missing from RoomOptions in C++?

Options
I am trying to follow the tutorials for the "Turnbased & Asynchronous Games" & "Room Persistence", but it seems like all documentation is in reference to your Unity SDK (and C# implementation of RoomOptions), and the C++ version of your classes do not have the same functionality.

class RoomOptions in RoomOptions.h in Windows SDK v4.1.4 (or 4.1.3.4)

does not work the same as

class RoomOptions in LoadBalancingPeer.cs in Unity3D-SDK_v4.1.1.2

Are the C++ classes/libraries out of date?

I am using Unreal Engine, and trying to get Room Persistence to work. I have looked into all of the associated C++ libraries included on your SDK page:
- Windows SDK v4.1.4, v4.1.3.4
- iOS SDK v4.1.4.0, v4.1.3.4
- Android NDK SDK v4.1.4.0, v4.1.3.4

Best Answers

Answers

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @EstonianGiant,

    it seems like all documentation is in reference to your Unity SDK (and C# implementation of RoomOptions)


    This is true indeed. Our code examples are in C#. We are aware of this and we would like to change this in the future and offer code examples in multiple programming languages.

    By default "CheckUserOnJoin" is enabled (set to true) and there is no way to change this currently.
    Do we need to set it to false?
  • JohnTube said:

    Hi @EstonianGiant,
    By default "CheckUserOnJoin" is enabled (set to true) and there is no way to change this currently.
    Do we need to set it to false?

    What do you mean by default it's enabled? That member variable doesn't exist in RoomOptions.h
    These are the only member variables.

    private:
    bool mIsVisible;
    bool mIsOpen;
    nByte mMaxPlayers;
    Common::Hashtable mCustomRoomProperties;
    Common::JVector mPropsListedInLobby;
    Common::JString mLobbyName;
    nByte mLobbyType;
    int mPlayerTtl;
    int mEmptyRoomTtl;

    Do you mean on the server side?
  • Thanks for the reply.

    I'm trying to setup my room as a "Persistent Room". As per your guide, I'm trying to set the PlayerTtl to "-1". But it doesn't seem to work.

    I set the room options as follows:
    ExitGames::LoadBalancing::RoomOptions().setMaxPlayers(3).setPlayerTtl(-1).setEmptyRoomTtl(10000)

    But when I check the request log for my 'GameCreate' webhook, it shows me:

    ..."CreateOptions":{"MaxPlayers":3,"LobbyId":null,"LobbyType":0,"CustomProperties":{},"EmptyRoomTTL":10000,"PlayerTTL":0,CheckUserOnJoin":true, ....

    Is there something I am missing to make this work in C++?
  • Thanks!