Show / Hide Table of Contents

Class GameModeBase

The GameModeBase defines the game being played.

Inheritance
System.Object
UObject
Actor
Info
GameModeBase
CppDevGameModeBase
DotNetGameModeBase
GameMode
FunctionalTestGameMode
Inherited Members
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 GameModeBase : Info
Remarks

It governs the game rules, scoring, what actors are allowed to exist in this game type, and who may enter the game.

It is only instanced on the server and will never exist on the client.

A GameModeBase actor is instantiated when the level is initialized for gameplay in C++ UGameEngine::LoadMap().

The class of this GameMode actor is determined by (in order) either the URL ?game=xxx, the GameMode Override value set in the World Settings, or the DefaultGameMode entry set in the game's Project Settings.

@see https://docs.unrealengine.com/latest/INT/Gameplay/Framework/GameMode/index.html

Properties

| Improve this Doc View Source

bPauseable

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

bStartPlayersAsSpectators

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

bUseSeamlessTravel

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

DefaultObject

Get UE4 Default Object for this Class

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

DefaultPawnClass

The default pawn class used by players.

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

GameSession

Game Session handles login approval, arbitration, online game interface

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

GameSessionClass

Class of GameSession, which handles login approval and online game interface

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

GameState

GameState is used to replicate game state relevant properties to all clients.

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

GameStateClass

Class of GameState associated with this GameMode.

Declaration
public SubclassOf<GameStateBase> GameStateClass { get; }
Property Value
Type Description
SubclassOf<GameStateBase>
| Improve this Doc View Source

HUDClass

HUD class this game uses.

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

PlayerControllerClass

The class of PlayerController to spawn for players logging in.

Declaration
public SubclassOf<PlayerController> PlayerControllerClass { get; }
Property Value
Type Description
SubclassOf<PlayerController>
| Improve this Doc View Source

PlayerStateClass

A PlayerState of this class will be associated with every player to replicate relevant player information to all clients.

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

ReplaySpectatorPlayerControllerClass

The PlayerController class used when spectating a network replay.

Declaration
public SubclassOf<PlayerController> ReplaySpectatorPlayerControllerClass { get; }
Property Value
Type Description
SubclassOf<PlayerController>
| Improve this Doc View Source

ServerStatReplicator

Server Stat Replicator

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

ServerStatReplicatorClass

Server Stat Replicator Class

Declaration
public SubclassOf<ServerStatReplicator> ServerStatReplicatorClass { get; }
Property Value
Type Description
SubclassOf<ServerStatReplicator>
| Improve this Doc View Source

SpectatorClass

The pawn class used by the PlayerController for players when spectating.

Declaration
public SubclassOf<SpectatorPawn> SpectatorClass { get; }
Property Value
Type Description
SubclassOf<SpectatorPawn>
| 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

ChangeName(Controller, String, Boolean)

Sets the name for a controller @

Declaration
public void ChangeName(Controller Controller, string NewName, bool bNameChange)
Parameters
Type Name Description
Controller Controller
System.String NewName
System.Boolean bNameChange
Remarks

param Controller The controller of the player to change the name of @param NewName The name to set the player to @param bNameChange Whether the name is changing or if this is the first time it has been set

| Improve this Doc View Source

GetNumPlayers()

Returns number of active human players, excluding spectators

Declaration
public int GetNumPlayers()
Returns
Type Description
System.Int32
| Improve this Doc View Source

GetNumSpectators()

Returns number of human players currently spectating

Declaration
public int GetNumSpectators()
Returns
Type Description
System.Int32
| Improve this Doc View Source

HasMatchStarted()

Returns true if the match start callbacks have been called

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

K2_FindPlayerStart(Controller, String)

Return the specific player start actor that should be used for the next spawn This will either use a previously saved startactor, or calls ChoosePlayerStart @

Declaration
public Actor K2_FindPlayerStart(Controller Player, string IncomingName)
Parameters
Type Name Description
Controller Player
System.String IncomingName
Returns
Type Description
Actor
Remarks

param Player The AController for whom we are choosing a Player Start @param IncomingName Specifies the tag of a Player Start to use @returns Actor chosen as player start (usually a PlayerStart)

| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

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

ResetLevel()

Overridable function called when resetting level.

Declaration
public void ResetLevel()
Remarks

This is used to reset the game state while staying in the same map Default implementation calls Reset() on all actors except GameMode and Controllers

| Improve this Doc View Source

RestartPlayer(Controller)

Tries to spawn the player's pawn, at the location returned by FindPlayerStart

Declaration
public void RestartPlayer(Controller NewPlayer)
Parameters
Type Name Description
Controller NewPlayer
| Improve this Doc View Source

RestartPlayerAtPlayerStart(Controller, Actor)

Tries to spawn the player's pawn at the specified actor's location

Declaration
public void RestartPlayerAtPlayerStart(Controller NewPlayer, Actor StartSpot)
Parameters
Type Name Description
Controller NewPlayer
Actor StartSpot
| Improve this Doc View Source

RestartPlayerAtTransform(Controller, Transform)

Tries to spawn the player's pawn at a specific location

Declaration
public void RestartPlayerAtTransform(Controller NewPlayer, Transform SpawnTransform)
Parameters
Type Name Description
Controller NewPlayer
Transform SpawnTransform
| Improve this Doc View Source

ReturnToMainMenuHost()

Return to main menu, and disconnect any players

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

StartPlay()

Transitions to calls BeginPlay on actors.

Declaration
public void StartPlay()

Events

| Improve this Doc View Source

CanSpectate

Return whether Viewer is allowed to spectate from the point of view of ViewTarget.

Declaration
public event GameModeBase.CanSpectate_delegate CanSpectate
Event Type
Type Description
GameModeBase.CanSpectate_delegate
| Improve this Doc View Source

ChoosePlayerStart

Return the 'best' player start for this player to spawn from Default implementation looks for a random unoccupied spot @

Declaration
public event GameModeBase.ChoosePlayerStart_delegate ChoosePlayerStart
Event Type
Type Description
GameModeBase.ChoosePlayerStart_delegate
Remarks

param Player is the controller for whom we are choosing a playerstart @returns AActor chosen as player start (usually a PlayerStart)

| Improve this Doc View Source

FindPlayerStart

Return the specific player start actor that should be used for the next spawn This will either use a previously saved startactor, or calls ChoosePlayerStart @

Declaration
public event GameModeBase.FindPlayerStart_delegate FindPlayerStart
Event Type
Type Description
GameModeBase.FindPlayerStart_delegate
Remarks

param Player The AController for whom we are choosing a Player Start @param IncomingName Specifies the tag of a Player Start to use @returns Actor chosen as player start (usually a PlayerStart)

| Improve this Doc View Source

GetDefaultPawnClassForController

Returns default pawn class for given controller

Declaration
public event GameModeBase.GetDefaultPawnClassForController_delegate GetDefaultPawnClassForController
Event Type
Type Description
GameModeBase.GetDefaultPawnClassForController_delegate
| Improve this Doc View Source

HandleStartingNewPlayer

Signals that a player is ready to enter the game, which may start it up

Declaration
public event GameModeBase.HandleStartingNewPlayer_delegate HandleStartingNewPlayer
Event Type
Type Description
GameModeBase.HandleStartingNewPlayer_delegate
| Improve this Doc View Source

InitializeHUDForPlayer

Initialize the AHUD object for a player. Games can override this to do something different

Declaration
public event GameModeBase.InitializeHUDForPlayer_delegate InitializeHUDForPlayer
Event Type
Type Description
GameModeBase.InitializeHUDForPlayer_delegate
| Improve this Doc View Source

InitStartSpot

Called from RestartPlayerAtPlayerStart, can be used to initialize the start spawn actor

Declaration
public event GameModeBase.InitStartSpot_delegate InitStartSpot
Event Type
Type Description
GameModeBase.InitStartSpot_delegate
| Improve this Doc View Source

K2_OnChangeName

Overridable event for GameMode blueprint to respond to a change name call @

Declaration
public event GameModeBase.K2_OnChangeName_delegate K2_OnChangeName
Event Type
Type Description
GameModeBase.K2_OnChangeName_delegate
Remarks

param Controller The controller of the player to change the name of @param NewName The name to set the player to @param bNameChange Whether the name is changing or if this is the first time it has been set

| Improve this Doc View Source

K2_OnLogout

Implementable event when a Controller with a PlayerState leaves the game.

Declaration
public event GameModeBase.K2_OnLogout_delegate K2_OnLogout
Event Type
Type Description
GameModeBase.K2_OnLogout_delegate
| Improve this Doc View Source

K2_OnRestartPlayer

Implementable event called at the end of RestartPlayer

Declaration
public event GameModeBase.K2_OnRestartPlayer_delegate K2_OnRestartPlayer
Event Type
Type Description
GameModeBase.K2_OnRestartPlayer_delegate
| Improve this Doc View Source

K2_OnSwapPlayerControllers

Called when a PlayerController is swapped to a new one during seamless travel

Declaration
public event GameModeBase.K2_OnSwapPlayerControllers_delegate K2_OnSwapPlayerControllers
Event Type
Type Description
GameModeBase.K2_OnSwapPlayerControllers_delegate
| Improve this Doc View Source

K2_PostLogin

Notification that a player has successfully logged in, and has been given a player controller

Declaration
public event GameModeBase.K2_PostLogin_delegate K2_PostLogin
Event Type
Type Description
GameModeBase.K2_PostLogin_delegate
| Improve this Doc View Source

MustSpectate

Returns true if NewPlayerController may only join the server as a spectator.

Declaration
public event GameModeBase.MustSpectate_delegate MustSpectate
Event Type
Type Description
GameModeBase.MustSpectate_delegate
| Improve this Doc View Source

PlayerCanRestart

Returns true if it's valid to call RestartPlayer. By default will call Player->CanRestartPlayer

Declaration
public event GameModeBase.PlayerCanRestart_delegate PlayerCanRestart
Event Type
Type Description
GameModeBase.PlayerCanRestart_delegate
| Improve this Doc View Source

ShouldReset

Overridable function to determine whether an Actor should have Reset called when the game has Reset called on it.

Declaration
public event GameModeBase.ShouldReset_delegate ShouldReset
Event Type
Type Description
GameModeBase.ShouldReset_delegate
Remarks

Default implementation returns true @param ActorToReset The actor to make a determination for @return true if ActorToReset should have Reset() called on it while restarting the game, false if the GameMode will manually reset it or if the actor does not need to be reset

| Improve this Doc View Source

SpawnDefaultPawnFor

Called during RestartPlayer to actually spawn the player's pawn, when using a start spot @

Declaration
public event GameModeBase.SpawnDefaultPawnFor_delegate SpawnDefaultPawnFor
Event Type
Type Description
GameModeBase.SpawnDefaultPawnFor_delegate
Remarks

param NewPlayer - Controller for whom this pawn is spawned @param StartSpot - Actor at which to spawn pawn @return a pawn of the default pawn class

Operators

| Improve this Doc View Source

Implicit(IntPtr to GameModeBase)

Convert from IntPtr to UObject

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