Wikis / Unreal Wiki / Legacy:NetMode

In replication, the NetMode property of the Level indicates what type of network game or standalone game is being played.

It is sometimes checked within functions or within the replication block when the code needs to behave slightly differently in a different network environment. It is most commonly used to differentiate whether an object with ROLE_Authority is in a botmatch/listen server or a dedicated server.

It will be different on clients and servers though other parts of the LevelInfo actor should be the same. The options are:

NM_Standalone 
a botmatch or single player game
NM_DedicatedServer 
a dedicated server
NM_ListenServer 
a non-dedicated server (ie the Host Multiplayer Game in the menu)
NM_Client 
a network client
simulated event Tick (float DeltaTime) {
  if ( Level.NetMode != NM_DedicatedServer ) {
    // Code here will only be executed on Listen servers and game clients.
  }
  if ( Level.NetMode == NM_DedicatedServer ) {
    // Code here will only be executed on a server.
  }
}

Related Topics

Page Categories

Page Information

2022-11-18T08:23:58.419109Z 2005-12-27T15:28:39Z SuperApe * https://wiki.beyondunreal.com/Legacy:NetMode Attribution-NonCommercial-ShareAlike 3.0