Closed asadm closed 5 months ago
@asadm If possible, please link the Chat.
We gotta reproduce this.
This could be because of the nullable property (even though we need it) here: https://github.com/asadm/playroom-unity/blob/main/Assets/PlayroomKit/PlayroomKit.cs#L42
This is how the options are being converted: https://github.com/asadm/playroom-unity/blob/main/Assets/Plugins/PlayroomPlugin.jslib#L35
Maybe we're losing information somewhere in the middle? @momintlh
Can we test this out (print logs?) and see?
@asadm If possible, please link the Chat.
We gotta reproduce this.
This could be because of the nullable property (even though we need it) here: https://github.com/asadm/playroom-unity/blob/main/Assets/PlayroomKit/PlayroomKit.cs#L42
This is how the options are being converted: https://github.com/asadm/playroom-unity/blob/main/Assets/Plugins/PlayroomPlugin.jslib#L35
Maybe we're losing information somewhere in the middle? @momintlh
Can we test this out (print logs?) and see?
I'll do some tests.
I just did a build test with setting maxPlayersPerRoom = 2,
and this is the JSON coming from C# to JS:
PlayroomKit.InsertCoin(new PlayroomKit.InitOptions()
{
maxPlayersPerRoom = 2,
defaultPlayerStates = new() {
{"score", -500},
}
}, () =>
{
PlayroomKit.OnPlayerJoin(AddPlayer);
PlayroomKit.SetState("score", score);
});
and Only 2 players can join:
and P3:
@asadm @SaadBazaz
@asadm - I noticed that our latest release is 3 weeks ago, despite merges and updates in the middle. Do you think this is the reason?
We may need to add a tag to our next PR to trigger it. Should we add one in #43?
@momintlh Can you ask the developer in Discord for a repro?
is our current main stable? i can do a release once we are stable.
@momintlh Test the current main. Don't add RPC to it yet; that can cause instability for now.
I tested the latest release and had no issues with setting maxPlayersPerRoom = 2. 3rd Player:
After a detailed discussion with the OP, the issue ended up being that options
parameter was not passed correctly to InsertCoin().
In v0.0.10 the signature is:
InsertCoin(callback, options)
In
PlayroomKit.InitOptions
, i'm settingmaxPlayersPerRoom
to 2. But, up to four is still able to join lobby.