Content/** filter=lfs diff=lfs merge=lfs -text
git lfs install
git add .gitattributes
Binaries
DerivedDataCache
Intermediate
Saved
.vscode
.vs
*.VC.db
*.opensdf
*.opendb
*.sdf
*.sln
*.suo
*.xcodeproj
*.xcworkspace
# Visual Studio 2015 user specific files
.vs/
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
*.ipa
# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
*.sln
*.suo
*.opensdf
*.sdf
*.VC.db
*.VC.opendb
# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga
# Binary Files
Binaries/*
Plugins/*/Binaries/*
# Builds
Build/*
# Whitelist PakBlacklist-<BuildConfiguration>.txt files
!Build/*/
Build/*/**
!Build/*/PakBlacklist*.txt
# Don't ignore icon files in Build
!Build/**/*.ico
# Built data for maps
*_BuiltData.uasset
# Configuration files generated by the Editor
Saved/*
# Compiled source files for the engine to use
Intermediate/*
Plugins/*/Intermediate/*
# Cache files for the editor to use
DerivedDataCache/*
# Visual Studio user settings files that should be ignored.
.vs/
*.pdb
*-Debug.*
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
*.ipa
# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
*.sln
*.suo
*.opensdf
*.sdf
*.VC.db
*.VC.opendb
# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga
# Binary Files
Binaries/*
Plugins/*/Binaries/*
obj/
# Builds
Build/*
# Whitelist PakBlacklist-<BuildConfiguration>.txt files
!Build/*/
Build/*/**
!Build/*/PakBlacklist*.txt
# Don't ignore icon files in Build
!Build/**/*.ico
# Built data for maps
*_BuiltData.uasset
# User-specific or configuration files generated by the Editor
Saved/*
FileOpenOrder/*
# Compiled source files for the engine to use
Intermediate/*
Plugins/*/Intermediate/*
# Cache files for the editor to use
DerivedDataCache/*
p4 info
p4 admin sysinfo
p4 typemap
Typemap:
binary+w //....exe
binary+w //....dll
binary+w //....lib
binary+w //....app
binary+w //....dylib
binary+w //....stub
binary+w //....ipa
binary+l //....uasset
binary+l //....umap
binary+l //....upk
binary+l //....udk
binary+l //....ubulk
binary+wS //..._BuiltData.uasset
# User-specific folders or temporary files that should not be versioned.
Saved/
Intermediate/
DerivedDataCache/
FileOpenOrder/
obj/
# Certain file types that should not be versioned.
*.pdb
*-Debug.*
# Visual Studio user settings files that should be ignored.
.vs/
# Visual Studio user settings files that should be ignored.
.vs/
*.pdb
*-Debug.*
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
*.ipa
# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
*.sln
*.suo
*.opensdf
*.sdf
*.VC.db
*.VC.opendb
# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga
# Binary Files
Binaries/*
Plugins/*/Binaries/*
obj/
# Builds
Build/*
# Whitelist PakBlacklist-<BuildConfiguration>.txt files
!Build/*/
Build/*/**
!Build/*/PakBlacklist*.txt
# Don't ignore icon files in Build
!Build/**/*.ico
# Built data for maps
*_BuiltData.uasset
# User-specific or configuration files generated by the Editor
Saved/*
FileOpenOrder/*
# Compiled source files for the engine to use
Intermediate/*
Plugins/*/Intermediate/*
# Cache files for the editor to use
DerivedDataCache/*
p4 ignores -i -v Main_ThirdPerson\Intermediate\file.pdb
c:\Perforce\Workspace\Main_ThirdPerson\Intermediate\file.pdb not ignored
Configuring it via Environment Variables have precedence over setting it via the command below:
p4 set P4IGNORE=C:\Users\YourName\.p4ignore
p4 ignores -i -v Main_ThirdPerson\Intermediate\file.pdb
c:\Perforce\Workspace\Main_ThirdPerson\Intermediate\file.pdb ignored by C:\Users\YourName.p4ignore:9:*.pdb
Compiling shaders may take too long due to Windows Defender Virus & Thread Protection monitoring.
To avoid that, add the following programs to the process
exclusion list:
devenv.exe
unrealeditor.exe
livecodingconsole.exe
shadercompileworker.exe
A missing UnrealBuildTool.dl
l error may arise while clicking Tools
> Generate Visual Studio Project
after atempting to open a Unreal project from a newly created workspace.
That being the case, open the UnrealBuildTool
solution and build it for Release
:
C:\Program Files\Epic Games\UE_5.3\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.sln
While attempting to delete a stream depot, an error message may suggest there are still streams associated with a depot even thought they do not show up in the P4 Admin interface. In that case, proceed via Command Prompt:
p4 streams -a
p4 stream --obliterate -y //ThirdPerson/Main
Now proceed to deleting the depot via P4 Admin.
Tearing may occur in the editor even when running with a good graphics card such as NVidia GeForce RTX 4090 depending on the relation between graphics card and monitor or laptop screen refresh rate, as observed with a Lenovo ThinkPad P6 (Core i9, 96Gb RAM, RTX 4090, OLED 3K 60Hz Display)
One approach to avoid it is to turn on VSync in the Unreal Editor via command line which will lock the update frequency to the display refresh rate.
r.VsyncEditor 1
- Launch the game fullscreen
- Launch a separate Command Prompt window with the game logs
"C:\Program Files\Epic Games\UE_5.3\Engine\Binaries\Win64\UnrealEditor.exe" "%USERPROFILE%\Documents\Unreal Projects\GameTitle\GameTitle.uproject" -game -log
"C:\Program Files\Epic Games\UE_5.3\Engine\Binaries\Win64\UnrealEditor.exe" "%USERPROFILE%\Documents\Unreal Projects\GameTitle\GameTitle.uproject" /Game/<Content/MapPath>/<MapName> -game -log
- Launch the server in a separate Command Prompt window
"C:\Program Files\Epic Games\UE_5.3\Engine\Binaries\Win64\UnrealEditor.exe" "%USERPROFILE%\Documents\Unreal Projects\GameTitle\GameTitle.uproject" -server -log
"C:\Program Files\Epic Games\UE_5.3\Engine\Binaries\Win64\UnrealEditor.exe" "%USERPROFILE%\Documents\Unreal Projects\GameTitle\GameTitle.uproject" /Game/<Content/MapPath>/<MapName> -server -log
- Launch the game fullscreen
- Join the specified server
- Launch a separate Command Prompt window with the game logs
"C:\Program Files\Epic Games\UE_5.3\Engine\Binaries\Win64\UnrealEditor.exe" "%USERPROFILE%\Documents\Unreal Projects\GameTitle\GameTitle.uproject" 127:0.0.1:7777 -game -log
See also: command-line-arguments-in-unreal-engine
- Unreal loads the Map
- The Map specifies a GameMode
- The PlayerController joins the Map
- The PlayerController asks the GameMode to spawn a Pawn
- The Pawn is linked to the PlayerController
UE_LOG(LogTemp, Display, TEXT("Message"));
UEngine *Engine = GetEngine();
check(Engine != nullptr);
Engine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, TEXT("Message"));
UFUNCTION(Exec)
void Host(const FString& Map) const;
Host Main
- The
GameMode
object only exists on the server
- Each Game Server/Client has a separate
GameInstance
objectConstructor
is called both when playing in the editor and when playing standaloneInit
only called when playing standalone
- Moves all connected player controllers to the new level
UWorld* World = GetWorld();
check(World != nullptr);
FString URL = "/Game/<GameProjectName>/Maps/";
URL.Append(Map);
URL.Append("?listen");
World->ServerTravel(URL);
- Moves a single
PlayerController
to a target IP address or Map
APlayerController* PlayerController = GetFirstLocalPlayerController();
check(PlayerController != nullptr);
PlayerController->ClientTravel(Address, ETravelType::TRAVEL_Absolute);
- Defined in C++
- Implemented in Blueprints
- Usage
- An event is expected to be called in C++ but is implemented in Blueprints
- Game-specific behaviours and interactions
Door.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Door.generated.h"
UCLASS()
class DELIBERATE_API ADoor : public AActor
{
GENERATED_BODY()
protected:
UFUNCTION(BlueprintImplementableEvent)
void OnOpen();
UFUNCTION(BlueprintImplementableEvent)
void OnClose();
};
Door.cpp
#include "Door.h"
- Similar to Blueprint Implementable Event
- Adds a default implementation in C++
- Can be overriden by a Blueprint implementation
Chest.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Chest.generated.h"
UCLASS()
class DELIBERATE_API AChest : public AActor
{
GENERATED_BODY()
protected:
UFUNCTION(BlueprintNativeEvent)
void OnOpen();
};
Chest.cpp
#include "Chest.h"
void AChest::OnOpen_Implementation()
{
// Default Implementation
}
Handle the communication between multiple unrelated actors with decoupled approach.
Allow objects to dynamically subscribe and handle game events
Actor 1
: Defines a Event (Dispatcher)
Actor 2
: Subscribes to Actor 1 Event (Bind to that Event Dispatcher. Gets added to that Event Dispatcher subscriber's list)
Actor 3
: Subscribes to Actor 1 Event (Bind to that Event Dispatcher. Gets added to that Event Dispatcher subscriber's list)
Actor 1
: Publishes an Event (Sends an Event as a Message to the Dispatcher)
That Event Dispatcher then loops through its subscriber's list and calls that Event handler on each subscriber. As a result:
Actor 2
: Gets notified of the event and has a chance the handle it.
Actor 3
: Gets notified of the event and has a chance the handle it.
Multiple Delegate types are supported
- Singlecast
- Multicast
- Dynamic
- Non-Dynamic
All types are declared via macros:
DECLARE_MULTICAST_DELEGATE_OneParam(<delegate_name>, <param_type>)
DECLARE_MULTICAST_DELEGATE_TwoParams(<delegate_name>, <param_type>, <param_type>)