Skip to main content

Cheatsheet

UPROPERTY

UPROPERTYUPROPERTY(VisibleAnywhere, Category='Player')
BlueprintAssignableMulticast Delegates only. Exposes property for assigning in Blueprints
BlueprintCallableMulticast Delegates only. Property exposed for calling in Blueprints
BlueprintReadOnlyReadable from blueprints, but not writeable
BlueprintReadWriteRead or writeable from blueprints
CategoryCategory of the property.
EditAnywhereCan be edited by property windows, on archetypes & instances
EditDefaultsOnlyEdited by property windows, but only on archetypes
EditFixedSizePrevent changing the length of an array (useful for dynamic arrays)
EditInstanceOnlyEdited by property windows, but only on instances, not on archetypes
TransientShould not be saved, zero-filled at load time
VisibleAnywhereVisible in property windows, but can't beedited at all
VisibleDefaultsOnlyVisible in property windows for archetypes, & can't be edited
VisibleInstanceOnlyVisible in property windows for instances, not archetypes, & can't be edited

UFUNCTION

UFUNCTIONUFUNCTION(BlueprintCallable, Category = Power)
BlueprintAuthorityOnlyWill not execute from Blueprint code if running on something without network authority
BlueprintCallableCan be executed in a Blueprint or Level Blueprint graph
BlueprintCosmeticIs cosmetic and will not run on dedicated servers
BlueprintImplementableEventCan be overridden in a Blueprint or Level Blueprint graph
BlueprintNativeEventDesigned to be overridden by a Blueprint but also has a native implementation
BlueprintPureDoes not affect the owning object in any way and can be executed in a Blueprint or Level Blueprint graph
ClientOnly executed on the client that owns the Object the function belongs to
ExecCan be executed from the in-game console
NetMulticastExecuted locally on the server and replicatedto all clients, regardless of the Actor's NetOwner
ReliableReplicated over the network, and is guaranteed to arrive regardless of bandwidth or network errors
ServerOnly executed on the server
UnreliableReplicated over the network but can fail due to bandwidth limitations or network errors

Types

TypesPrefixExample
AActorAACharacter
Booleanbbool bIsTeaDelicious;
EnumsEenum EPlayerType;
InterfacesIINetworkConnection
StructFFMyStruct;
SWidgetSSMyWidget;
TemplateTTArray< int > MyIntArray;
UObjectUUCameraComponent* ThirdPersonCamera;

Naming & Coding Standards

Naming & Coding Standards
boolbool bIsTeaDelicious;
floatfloat TeaWeight;
int32int32 TeaCount;
FNameFName TeaName;
FStringFString TeaFriendlyName;
UClassUClass* TeaClass;
USoundCueUSoundCue* TeaSound;
UTextureUTexture* TeaTexture;;

Operator

OperatorUsage
&&AND
IIOR
!NOT
<=LESS THAN OR EQUAL
>=GREATER THAN OR EQUAL
!=NOT EQUAL
==EQUAL
++INCREMENT
--DECREMENT
?IF
:COLON

Role

RoleDescription
NoneThe Actor has no role in a network game and does not replicate
AuthorityThe Actor is authoritative and replicates its information to remote proxies of it on other machines
Simulated ProxyThe Actor is a remote proxy that is controlled entirely by an authoritative Actor on another machine. Most Actors in a network game, like pickups, projectiles, or interactive objects, will appear as Simulated Proxies on remote clients
Autonomous ProxyThe Actor is a remote proxy that is capable of performing some functions locally, but receives corrections from an authoritative Actor. Autonomous Proxy is usually reserved for Actors under the direct control of a player, like Pawns

Servers

Network ModeDescription
StandaloneThe game is running as a server that does not accept connections from remote clients. Any players participating in the game are strictly local players. This mode is used for single-player and local multiplayer games. It will run both server-side logic and client-side logic as appropriate for the local players.
ClientThe game is running as a client that is connected to a server in a network multiplayer session. It will not run any server-side logic.
Server (Listen)The game is running as a server hosting a network multiplayer session. It accepts connections from remote clients and has local players directly on the server. This mode is often used for casual cooperative and competitive multiplayer.
Server (Dedicated)The game is running as a server hosting a network multiplayer session. It accepts connections from remote clients, but has no local players, so it discards graphics, sound, input, and other other player-oriented features in order to run more efficiently. This mode is often used for games requiring more persistent, secure, or large-scale multiplayer

Replication

Replication FeatureDescription
Creation and DestructionWhen an authoritative version of a replicated Actor is spawned on a server, it automatically generates remote proxies of itself on all connected clients. It will then replicate information to those remote proxies. If you destroy an authoritative Actor, it will automatically destroy its remote proxies on all connected clients
Movement ReplicationIf an authoritative Actor has Replicate Movement enabled, or bReplicateMovement is set to true in C++, it will automatically replicate its Location, Rotation, and Velocity
Variable ReplicationAny variables that are designated as being replicated will automatically replicate from the authoritative actor to its remote proxies whenever their values change
Component ReplicationActor Components replicate as part of the Actor that owns them. Any variables within the Component that are designated as being replicated will replicate, and any Remote Procedure Calls called within the component will behave consistently with Remote Procedure Calls called in the Actor class
Remote Procedure CallsRemote Procedure Calls are special functions that are transmitted to specific machines in a network game. No matter what machine an Remote Procedure Call is initially called on, its implementation will run only on the machine it is intended for. These may be designated as Server (only runs on the server), Client (only runs on the Actor's owning client), or NetMulticast (runs on every machine connected to the session, including the server