Legacy:Viewport - Unreal Wiki

# Legacy:Viewport

### From Unreal Wiki, The Unreal Engine Documentation Site

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.

## Usage

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.
    }

Categories: Legacy Class (UT) | Legacy Class (UT2003) | Legacy Class (UT2004)

##### Views

- Legacy
- Discussion
- Current revision

##### Search