I love the smell of UnrealEd crashing in the morning. – tarquin
Legacy:Viewport
From Unreal Wiki, The Unreal Engine Documentation Site
- 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.
}
