Copy paste of this topic, but I can’t react on that one, so re-opening it in a different thread.
If the solution accepted is true, isn’t that a bug?
Copy paste of this topic, but I can’t react on that one, so re-opening it in a different thread.
If the solution accepted is true, isn’t that a bug?
clients dont know about other clients so they are always 0
only the server will have the correct references
I’m talking about PIE.
When I start a PIE session with 2 clients, when I print the “PlayerName” from the controller, in my EDITOR window (client0) I see messages;
Client 0: Client0Identifier
Client 0: Client1Identifier
In my 2nd client window (client 1) I see the following:
Client 0: Client0Identifier
Client 0: Client1Identifier
I would expect to either see “Client1Identifier” in the window of client1, or see Client 1 and Client 0 prefixed properly…
Testing this on 5.1 and 5.2 builds I get the proper Client 1, Client 2 and Server prints.
PrintString in Character class
With just a print (no conditions) I get the following (expected behavior).
With conditions (local role = Autonomous)…
Colored coded version
Yes it is a bug that was introduced in 5.3
So you’re seeing this Client0 behaviour in 5.3 too? Thanks for the reproduction, looks like it works as expected in 5.1 and 5.2.
It was caused when they changed the type of GPlayInEditorID from int32
to a struct FPlayInEditorID
in 5.3
FString::Printf(TEXT("Client %d: "), GPlayInEditorID)
won’t work properly.
FString::Printf(TEXT("Client %d: "), static_cast<int32>(GPlayInEditorID))
Explicitly converting it to int32 works though.
Thanks for this! Looks like ue5-main GH branch has a fix for this, so I envision this should work again in 5.5 (my guess is a patch release won’t go out for this).