I'm a doctor, not a mechanic


From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
Object >> Player >> ViewPort
See UnrealEd Viewport for the viewports in the UnrealEd interface.

This class represents a real Player playing on this (where unreal is running that is) computer. Useful if you wish to detect if a PlayerPawn or PlayerController is controlled locally.

This is a native class without any UnrealScript source code.


Here's how you can check the type of connection of a player:

if ( Viewport(SomePlayerPawn.Player) != None ) {
  //This player is controlled locally.
else if ( NetConnection(SomePlayerPawn.Player) != None ) {
  // This player is controlled remotely.
else {
  // This player is not controlled by anybody.
  // The player might be in the process of connecting or this
  // could be a script-spawned PlayerPawn/PlayerController.