Hello
I’m creating a multiplayer game which users can enter by android, ios, VR glasses ( i have one project and export for android, ios, and VR glasses)
all users with multiple devices can enter into same level and play together
for each device i have special pawn, for example for VR use VRPawn and for android i use ThirdPerson Pawn
I have two levels, level 1 has open level blueprint with my server ip (ip:port)
and in level 2 (on my dedicated server) i want to check and If it was Android, I would load
ThirdPerson and if it was glasses, I would VRPawn load.
the problem is, how send data from level 1 to level 2 and tell it what kind of device it is
The bp-only way would be to spawn the common pawn for all platforms, then wait for rpc from the client which would specify the platform and respawn the player with new pawn.
The UE’s intended way is to pass required custom params via the open command with format like:
Open 127.0.0.1:7777?MyCustomParam1=MyCustomValue1?MyCustomValuelessParam2?MyCustomParam3=MyCustomValue3
and then parse them in AGameMode::InitNewPlayer() (can use UGameplayStatics::ParseOption & UGameplayStatics::HasOption to parse them)
how can i call rpc from client to server with Blueprint ?
You create custom event and set it to be RPC. Ue’s networking is a very broad topic so official documentation would describe it better than me. This is also another popular link about network
console’s open, OpenLevel bp node and the line you provided are (nearly?) the same. Yes, your line is correct, just make sure your host address is correct.
A few notes about address: standalone server by default is running on port 7777; PIE(play in editor)'s server by default is running on port 17777. If server is on the same machine as the client then 127.0.0.1 is fine, otherwise you should provide an actual server’s IP address.