Shipping:
Config:
Logs:
Save games/Rest:
Crashes:
Resourcces:
The configuration file hierarchy is read in starting with Base.ini
, with values
in later files in the hierarchy overriding earlier values. All files in the Engine
folder will be applied to all projects, while project-specific settings should be
in files in the project directory.
Finally, all project-specific and platform-specific differences are saved out to [ProjectDirectory]/Saved/Config/[Platform]/[Category].ini
The below file hierarchy example is for the Engine category of configuration files.
Engine/Config/Base.ini
Base.ini is usually empty.
Engine/Config/BaseEngine.ini
Engine/Config/[Platform]/[Platform]Engine.ini
[ProjectDirectory]/Config/DefaultEngine.ini
[ProjectDirectory]/Config/[Platform]/[Platform]Engine.ini
[ProjectDirectory]/Saved/Config/[Platform]/Engine.ini
The configuration file in the Saved directory only stores the project-specific
and platform-specific differences in the stack of configuration files.
What is a Console Variable? See Docs
Priority for console commands from lower to higher goes like this:
SetByConstructor
- When created, defaultSetByScalability
- From Scalability.ini
(lower priority than game settings so it's easier to override partially)SetByGameSetting
- This is usually set from your Game Settings In Game UI or from a fileSetByProjectSetting
- Project settings (editor UI or from file, higher priority than game setting to allow to enforce some setting for this project)SetByDeviceProfile
- Per device setting in DeviceProfiles.ini
(e.g. specific iOS device, higher priority than per project to do device specific settings).SetByConsoleVariablesIni
- Consolevariables.ini
(for multiple projects) set in Engine/Config
SetByCommandline
- A minus command e.g. -VSync (very high priority to enforce the setting for the application)SetByCode
- Least useful, likely a hack, maybe better to find the correct SetBy…SetByConsole
- Editor UI or console in game or editorSee Creating / Registering a Console Variable
Basically ECVF_SetByConstructor === ECVF_Default
.
Example:
From Scalability.ini
(lower priority than game settings so it’s easier to override partially).
Example:
This is usually set from your Game Settings In Game UI or from a file.
The config is usually kept inside GameUserSettings.ini
and see the contents of UGameUserSettings
.
Examples of console variables that might be set by the game user settings:
NOTE: Engine Only
These console commands can be set in the DeviceProfiles.ini
file.
Example:
(back tick) `
- Open the developer console.
This is the highest priority you can set for commands.
When running the game you can append these arguments:
Used by multiple files:
Used in only one file, static
log:
Where:
CategoryName
- is simply the name for the new category you are defining.DefaultVerbosity
- is the verbosity level used when one is not specified in the ini files or on the command line. Anything more verbose than this will not be logged.CompileTimeVerbosity
- is the maximum verbosity to compile in the code. Anything more verbose than this will not be compiled.Examples:
NOTE: There is an issue with this serializer where in editor it converts the field to Field
but in packaged game it converts the field to field
.
Resources:
NOTE: that enabling any stats for live viewing affects the game thread performance
NOTE: To open the *.ue4stats
file use the SessionFrontend Profiler Tab
https://pzurita.wordpress.com/2015/02/10/limitations-of-memory-tracking-features-in-unreal-engine-4/
See whole docs in Runtime/Core/Public/Stats/Stats.h
Stats system in the UE4 supports following stats types:
Cycle Counter
- a generic cycle counter used to counting the number of cycles during the lifetime of the objectFloat/Dword Counter
- a counter that is cleared every frameFloat/Dword Accumulator
- a counter that is not cleared every frame, persistent stat, but it can be resetMemory
- a special type of counter that is optimized for memory trackingEach stat needs to be grouped, this usually corresponds with displaying the specified stat group i.e. 'stat statsystem' which displays stats' related data.
To define a stat group you need to use one of the following methods:
DECLARE_STATS_GROUP(GroupDesc, GroupId, GroupCat)
- declares a stats group which is enabled by defaultDECLARE_STATS_GROUP_VERBOSE(GroupDesc, GroupId ,GroupCat)
- declares a stats group which is disabled by defaultDECLARE_STATS_GROUP_MAYBE_COMPILED_OUT(GroupDesc, GroupId, GroupCat)
- declares a stats group which is disabled by default and may be stripped by the compilerwhere
GroupDesc
is a text description of the groupGroupId
is an UNIQUE id of the groupGroupCat
is reserved for future useCompileIn
if set to true, the compiler may strip it outExample:
Now, you can declare/define a stat.
A stat can be used only in one cpp file, in the function scope, in the module scope or can be used in the whole project.
For one file scope you need to use one of the following methods depending on the stat type.
DECLARE_CYCLE_STAT(CounterName, StatId, GroupId)
- declares a cycle counter stat
DECLARE_SCOPE_CYCLE_COUNTER(CounterName, StatId, GroupId)
- declares a cycle counter stat and uses it at the same time, it is limited to one function scope
QUICK_SCOPE_CYCLE_COUNTER(StatId)
- declares a cycle counter stat that will belong to stat group called 'Quick'
where
CounterName
is a text description of the statStatId
is an UNIQUE id of the statGroupId
is an id of the group that the stat will belong to, the GroupId from DECLARE_STATS_GROUP*Pool
is a platform specific memory pool, more details laterAPI
is the *_API of module, can be empty if the stat will be used only in that moduleExample:
(back tick) `
- Open the developer console.
(apostrophe) '
- Open the gameplay debugger
F1 - F5
- change different view modes
Open the WidgetReflector - type in the developer console WidgetReflector
FFrame::KismetExecutionMessage
FMessageLog
FBlueprintCoreDelegates::ThrowScriptException
FScriptStackTracker
FStackTracker
FDebug::DumpStackTraceToLog(VerbosityLevel)
NOTE: To create a fake crash, type this into the console in game: debug crash
NOTE: To force log callstacks you can add -ForceLogCallstacks
to the command line.
Steps:
Saved/Crashes/<Crash Folder>
Crashes
folder as it is not complete, check instead Saved/Logs/<Log file>
this will have the call stack at the end.UE4Minidump.dmp
file.Debug with Native Only
NOTE: if you built the pdb file in another day than the exe was built, use this tool https://web.archive.org/web/20210205095232/https://www.debuginfo.com/tools/chkmatch.html
.sympath+ c:\dev\illuvium\game-client\Packaged\RELEASE-Illuvium-PrivateBeta1-Win_24_May_2022\Illuvium\Binaries\Win64\
.reload
From Runtime/CoreUObject/Private/UObject/Class.cpp