Show / Hide Table of Contents

Class GameMode

GameMode is a subclass of GameModeBase that behaves like a multiplayer match-based game.

Inheritance
System.Object
UObject
Actor
Info
GameModeBase
GameMode
Inherited Members
GameModeBase.K2_OnChangeName
GameModeBase.K2_OnLogout
GameModeBase.K2_OnRestartPlayer
GameModeBase.K2_OnSwapPlayerControllers
GameModeBase.K2_PostLogin
GameModeBase.CanSpectate
GameModeBase.ChoosePlayerStart
GameModeBase.FindPlayerStart
GameModeBase.GetDefaultPawnClassForController
GameModeBase.HandleStartingNewPlayer
GameModeBase.InitializeHUDForPlayer
GameModeBase.InitStartSpot
GameModeBase.MustSpectate
GameModeBase.PlayerCanRestart
GameModeBase.ShouldReset
GameModeBase.SpawnDefaultPawnFor
GameModeBase.ChangeName(Controller, String, Boolean)
GameModeBase.GetNumPlayers()
GameModeBase.GetNumSpectators()
GameModeBase.HasMatchStarted()
GameModeBase.K2_FindPlayerStart(Controller, String)
GameModeBase.ResetLevel()
GameModeBase.RestartPlayer(Controller)
GameModeBase.RestartPlayerAtPlayerStart(Controller, Actor)
GameModeBase.RestartPlayerAtTransform(Controller, Transform)
GameModeBase.ReturnToMainMenuHost()
GameModeBase.StartPlay()
GameModeBase.GameSessionClass
GameModeBase.GameStateClass
GameModeBase.PlayerControllerClass
GameModeBase.PlayerStateClass
GameModeBase.HUDClass
GameModeBase.DefaultPawnClass
GameModeBase.SpectatorClass
GameModeBase.ReplaySpectatorPlayerControllerClass
GameModeBase.ServerStatReplicatorClass
GameModeBase.GameSession
GameModeBase.GameState
GameModeBase.ServerStatReplicator
GameModeBase.bUseSeamlessTravel
GameModeBase.bStartPlayersAsSpectators
GameModeBase.bPauseable
Info.SpriteComponent
Actor.K2_OnBecomeViewTarget
Actor.K2_OnEndViewTarget
Actor.K2_OnReset
Actor.ReceiveActorBeginCursorOver
Actor.ReceiveActorBeginOverlap
Actor.ReceiveActorEndCursorOver
Actor.ReceiveActorEndOverlap
Actor.ReceiveActorOnClicked
Actor.ReceiveActorOnInputTouchBegin
Actor.ReceiveActorOnInputTouchEnd
Actor.ReceiveActorOnInputTouchEnter
Actor.ReceiveActorOnInputTouchLeave
Actor.ReceiveActorOnReleased
Actor.ReceiveAnyDamage
Actor.ReceiveBeginPlay
Actor.ReceiveDestroyed
Actor.ReceiveEndPlay
Actor.ReceiveHit
Actor.ReceivePointDamage
Actor.ReceiveRadialDamage
Actor.ReceiveTick
Actor.UserConstructionScript
Actor.ActorHasTag(Name)
Actor.AddComponent(Name, Boolean, Transform, UObject)
Actor.AddTickPrerequisiteActor(Actor)
Actor.AddTickPrerequisiteComponent(ActorComponent)
Actor.DetachRootComponentFromParent(Boolean)
Actor.DisableInput(PlayerController)
Actor.EnableInput(PlayerController)
Actor.FlushNetDormancy()
Actor.ForceNetUpdate()
Actor.GetActorBounds(Boolean)
Actor.GetActorEnableCollision()
Actor.GetActorEyesViewPoint()
Actor.GetActorForwardVector()
Actor.GetActorLabel()
Actor.GetActorRelativeScale3D()
Actor.GetActorRightVector()
Actor.GetActorScale3D()
Actor.GetActorTickInterval()
Actor.GetActorTimeDilation()
Actor.GetActorUpVector()
Actor.GetAllChildActors(Boolean)
Actor.GetAttachedActors()
Actor.GetAttachParentActor()
Actor.GetAttachParentSocketName()
Actor.GetComponentByClass(SubclassOf<ActorComponent>)
Actor.GetComponentsByClass(SubclassOf<ActorComponent>)
Actor.GetComponentsByTag(SubclassOf<ActorComponent>, Name)
Actor.GetDistanceTo(Actor)
Actor.GetDotProductTo(Actor)
Actor.GetFolderPath(Name)
Actor.GetGameTimeSinceCreation()
Actor.GetHorizontalDistanceTo(Actor)
Actor.GetHorizontalDotProductTo(Actor)
Actor.GetInputAxisKeyValue(Key)
Actor.GetInputAxisValue(Name)
Actor.GetInputVectorAxisValue(Key)
Actor.GetInstigator()
Actor.GetInstigatorController()
Actor.GetLifeSpan()
Actor.GetLocalRole()
Actor.GetOverlappingActors(SubclassOf<Actor>)
Actor.GetOverlappingComponents()
Actor.GetOwner()
Actor.GetParentActor()
Actor.GetParentComponent()
Actor.GetRemoteRole()
Actor.GetSquaredDistanceTo(Actor)
Actor.GetTickableWhenPaused()
Actor.GetTransform()
Actor.GetVelocity()
Actor.GetVerticalDistanceTo(Actor)
Actor.HasAuthority()
Actor.IsActorBeingDestroyed()
Actor.IsActorTickEnabled()
Actor.IsChildActor()
Actor.IsEditable()
Actor.IsHiddenEd()
Actor.IsHiddenEdAtStartup()
Actor.IsOverlappingActor(Actor)
Actor.IsSelectable()
Actor.IsTemporarilyHiddenInEditor(Boolean)
Actor.K2_AddActorLocalOffset(Vector, Boolean, Boolean)
Actor.K2_AddActorLocalRotation(Rotator, Boolean, Boolean)
Actor.K2_AddActorLocalTransform(Transform, Boolean, Boolean)
Actor.K2_AddActorWorldOffset(Vector, Boolean, Boolean)
Actor.K2_AddActorWorldRotation(Rotator, Boolean, Boolean)
Actor.K2_AddActorWorldTransform(Transform, Boolean, Boolean)
Actor.K2_AttachRootComponentTo(SceneComponent, Name, Byte, Boolean)
Actor.K2_AttachRootComponentToActor(Actor, Name, Byte, Boolean)
Actor.K2_AttachToActor(Actor, Name, EAttachmentRule, EAttachmentRule, EAttachmentRule, Boolean)
Actor.K2_AttachToComponent(SceneComponent, Name, EAttachmentRule, EAttachmentRule, EAttachmentRule, Boolean)
Actor.K2_DestroyActor()
Actor.K2_DestroyComponent(ActorComponent)
Actor.K2_DetachFromActor(EDetachmentRule, EDetachmentRule, EDetachmentRule)
Actor.K2_GetActorLocation()
Actor.K2_GetActorRotation()
Actor.K2_GetRootComponent()
Actor.K2_SetActorLocation(Vector, Boolean, Boolean)
Actor.K2_SetActorLocationAndRotation(Vector, Rotator, Boolean, Boolean)
Actor.K2_SetActorRelativeLocation(Vector, Boolean, Boolean)
Actor.K2_SetActorRelativeRotation(Rotator, Boolean, Boolean)
Actor.K2_SetActorRelativeTransform(Transform, Boolean, Boolean)
Actor.K2_SetActorRotation(Rotator, Boolean)
Actor.K2_SetActorTransform(Transform, Boolean, Boolean)
Actor.K2_TeleportTo(Vector, Rotator)
Actor.MakeMIDForMaterial(MaterialInterface)
Actor.MakeNoise(Single, Pawn, Vector, Single, Name)
Actor.PrestreamTextures(Single, Boolean, Int32)
Actor.RemoveTickPrerequisiteActor(Actor)
Actor.RemoveTickPrerequisiteComponent(ActorComponent)
Actor.SetActorEnableCollision(Boolean)
Actor.SetActorHiddenInGame(Boolean)
Actor.SetActorLabel(String, Boolean)
Actor.SetActorRelativeScale3D(Vector)
Actor.SetActorScale3D(Vector)
Actor.SetActorTickEnabled(Boolean)
Actor.SetActorTickInterval(Single)
Actor.SetFolderPath(Name)
Actor.SetIsTemporarilyHiddenInEditor(Boolean)
Actor.SetLifeSpan(Single)
Actor.SetNetDormancy(Byte)
Actor.SetOwner(Actor)
Actor.SetReplicateMovement(Boolean)
Actor.SetReplicates(Boolean)
Actor.SetTickableWhenPaused(Boolean)
Actor.SetTickGroup(Byte)
Actor.SnapRootComponentTo(Actor, Name)
Actor.TearOff()
Actor.WasRecentlyRendered(Single)
Actor.PrimaryActorTick
Actor.bHidden
Actor.bNetTemporary
Actor.bNetStartup
Actor.bOnlyRelevantToOwner
Actor.bAlwaysRelevant
Actor.bReplicateMovement
Actor.bTearOff
Actor.bExchangedRoles
Actor.bNetLoadOnClient
Actor.bNetUseOwnerRelevancy
Actor.bRelevantForNetworkReplays
Actor.bReplayRewindable
Actor.bAllowTickBeforeBeginPlay
Actor.bAutoDestroyWhenFinished
Actor.bBlockInput
Actor.bCanBeDamaged
Actor.bCollideWhenPlacing
Actor.bFindCameraComponentWhenViewTarget
Actor.bGenerateOverlapEventsDuringLevelStreaming
Actor.bIgnoresOriginShifting
Actor.bEnableAutoLODGeneration
Actor.bIsEditorOnlyActor
Actor.bActorSeamlessTraveled
Actor.bReplicates
Actor.bCanBeInCluster
Actor.bAllowReceiveTickEventOnDedicatedServer
Actor.bActorEnableCollision
Actor.bActorIsBeingDestroyed
Actor.RemoteRole
Actor.ReplicatedMovement
Actor.InitialLifeSpan
Actor.CustomTimeDilation
Actor.AttachmentReplication
Actor.Owner
Actor.NetDriverName
Actor.Role
Actor.NetDormancy
Actor.AutoReceiveInput
Actor.InputPriority
Actor.InputComponent
Actor.NetCullDistanceSquared
Actor.NetTag
Actor.NetUpdateFrequency
Actor.MinNetUpdateFrequency
Actor.NetPriority
Actor.Instigator
Actor.Children
Actor.RootComponent
Actor.PivotOffset
Actor.ControllingMatineeActors
Actor.GroupActor
Actor.SpriteScale
Actor.FolderPath
Actor.bHiddenEd
Actor.bIsEditorPreviewActor
Actor.bHiddenEdLayer
Actor.bHiddenEdLevel
Actor.bLockLocation
Actor.bActorLabelEditable
Actor.bEditable
Actor.bListedInSceneOutliner
Actor.bHiddenEdTemporary
Actor.InstanceComponents
Actor.BlueprintCreatedComponents
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class GameMode : GameModeBase
Remarks

It has default behavior for picking spawn points and match state. If you want a simpler base, inherit from GameModeBase instead.

Properties

| Improve this Doc View Source

bDelayedStart

Declaration
public bool bDelayedStart { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bHandleDedicatedServerReplays

Declaration
public bool bHandleDedicatedServerReplays { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static GameMode DefaultObject { get; }
Property Value
Type Description
GameMode
| Improve this Doc View Source

EngineMessageClass

Contains strings describing localized game agnostic messages.

Declaration
public SubclassOf<LocalMessage> EngineMessageClass { get; set; }
Property Value
Type Description
SubclassOf<LocalMessage>
| Improve this Doc View Source

InactivePlayerArray

PlayerStates of players who have disconnected from the server (saved in case they reconnect)

Declaration
public ObjectArrayField<PlayerState> InactivePlayerArray { get; }
Property Value
Type Description
ObjectArrayField<PlayerState>
| Improve this Doc View Source

InactivePlayerStateLifeSpan

Time a playerstate will stick around in an inactive state after a player logout

Declaration
public float InactivePlayerStateLifeSpan { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

MatchState

What match state we are currently in

Declaration
public Name MatchState { get; set; }
Property Value
Type Description
Name
| Improve this Doc View Source

MaxInactivePlayers

The maximum number of inactive players before we kick the oldest ones out

Declaration
public int MaxInactivePlayers { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

MinRespawnDelay

Minimum time before player can respawn after dying.

Declaration
public float MinRespawnDelay { get; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

NumBots

number of non-human players (AI controlled but participating as a player).

Declaration
public int NumBots { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

NumPlayers

Current number of human players.

Declaration
public int NumPlayers { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

NumSpectators

Current number of spectators.

Declaration
public int NumSpectators { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

NumTravellingPlayers

Number of players that are still traveling from a previous map

Declaration
public int NumTravellingPlayers { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class

Methods

| Improve this Doc View Source

AbortMatch()

Report that a match has failed due to unrecoverable error

Declaration
public void AbortMatch()
| Improve this Doc View Source

EndMatch()

Transition from InProgress to WaitingPostMatch. You can call this manually, will also get called if ReadyToEndMatch returns true

Declaration
public void EndMatch()
| Improve this Doc View Source

GetMatchState()

Returns the current match state, this is an accessor to protect the state machine flow

Declaration
public Name GetMatchState()
Returns
Type Description
Name
| Improve this Doc View Source

HasMatchEnded()

Returns true if the match state is WaitingPostMatch or later

Declaration
public bool HasMatchEnded()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsMatchInProgress()

Returns true if the match state is InProgress or other gameplay state

Declaration
public bool IsMatchInProgress()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

Declaration
public static GameMode New(UObject obj = null, Name name = default(Name))
Parameters
Type Name Description
UObject obj
Name name
Returns
Type Description
GameMode
| Improve this Doc View Source

RestartGame()

Restart the game, by default travel to the current map

Declaration
public void RestartGame()
| Improve this Doc View Source

Say(String)

Exec command to broadcast a string to all players

Declaration
public void Say(string Msg)
Parameters
Type Name Description
System.String Msg
| Improve this Doc View Source

StartMatch()

Transition from WaitingToStart to InProgress. You can call this manually, will also get called if ReadyToStartMatch returns true

Declaration
public void StartMatch()

Events

| Improve this Doc View Source

K2_OnSetMatchState

Implementable event to respond to match state changes

Declaration
public event GameMode.K2_OnSetMatchState_delegate K2_OnSetMatchState
Event Type
Type Description
GameMode.K2_OnSetMatchState_delegate
| Improve this Doc View Source

ReadyToEndMatch

@return true if ready to End Match. Games should override this

Declaration
public event GameMode.ReadyToEndMatch_delegate ReadyToEndMatch
Event Type
Type Description
GameMode.ReadyToEndMatch_delegate
| Improve this Doc View Source

ReadyToStartMatch

@return True if ready to Start Match. Games should override this

Declaration
public event GameMode.ReadyToStartMatch_delegate ReadyToStartMatch
Event Type
Type Description
GameMode.ReadyToStartMatch_delegate

Operators

| Improve this Doc View Source

Implicit(IntPtr to GameMode)

Convert from IntPtr to UObject

Declaration
public static implicit operator GameMode(IntPtr p)
Parameters
Type Name Description
System.IntPtr p
Returns
Type Description
GameMode
  • Improve this Doc
  • View Source
Back to top Generated by DocFX