Im testing some multiplayer stuff and running 2 PIE clients in editor. For debugging reasons, I would like to print a log message that contains info on what client it comes from. I thought of using the viewport/window name. I found you can access the current viewport via GetWorld()->GetGameViewport() but i haven’t found yet where I can get the window name. Any ideas?
How to get the name of current PIE viewport/window?
Has anyone ever found out how to do this? I’ve been looking around, and it looks like I want SLevelEditor::GetTabTitle. But it’s a private function, in a private module. I’ve also tried looking for ways to find the parent DockTab, but I don’t see any way to get that.
You can see this from Epics team implementation by double click for PrintString function into the Blueprints and copy it for your self.
!!! Buts this isworks before the instantiating an new PIE window. GPlayInEditorID is global variable which is common for all of instances of the PIE when you during playing in editor. You must store returns value for using it later.
For an standalone you needs to identify you game client using server.
Where the EWorldType is a type of source of world (editor browsers or standalone game viewport).
ENetMode is a mode whats currently game is running (Standalone/Client and etc.)