Blueprints#
You should be able to add BlueprintPrivate/Protected meta data to you UPROPERTY() decl, like this:
To Mark blueprint properties as protected, just declare them natively inside of protected access specifier
For functions, you can do meta=(BlueprintProtected)
BlueprintThreadSafe/NotBlueprintThreadSafe:
Only valid on Blueprint Function Libraries. This specifier marks the functions in this class as callable on non-game threads in Animation Blueprints.
RestrictedToClasses
Used by Blueprint Function Library classes to restrict usage to the classes named in the list.
KismetHideOverrides=»Event1, Event2, ..»
List of blueprint events that are not be allowed to be overridden.
BlueprintAutocast
Used only by static BlueprintPure functions from a Blueprint Function Library. A Cast node will be automatically added for the return type and the type of the first parameter of the function.
Hide Functions:
HideFunctions=(Category1, Category2, . ) Hides all functions in the the specified category from the property viewer.
HideFunctions=FunctionName Hides the named functions from the property viewer.
Functions#
Parameters#
Function Parameters:
AdvancedDisplay=»Parameter1, Parameter2, ..» The comma-separated list of parameters will show up as advanced pins (requiring UI expansion).
AdvancedDisplay=N Replace N with a number, and all parameters after the Nth will show up as advanced pins (requiring UI expansion). E.g. ‘AdvancedDisplay=2’ will mark all but the first two parameters as advanced).
ArrayParm=»Parameter1, Parameter2, ..»
Indicates that a BlueprintCallable function should use a Call Array Function node and that the listed parameters should be treated as wild card array properties.
ArrayTypeDependentParams=»Parameter»
When ArrayParm is used, this specifier indicates one parameter which will determine the types of all parameters in the ArrayParm list.
DefaultToSelf
For BlueprintCallable functions, this indicates that the Object property’s named default value should be the self context of the node.
HidePin=»Parameter»
For BlueprintCallable functions, this indicates that the parameter pin should be hidden from the user’s view. Note that only one parameter pin per function can be hidden in this manner.
WorldContext=»Parameter»
Used by BlueprintCallable functions to indicate which parameter determines the World that the operation is occurring within.
CustomStructureParam=»Parameter1, Parameter2, ..»
The listed parameters are all treated as wildcards. This specifier requires the UFUNCTION-level specifier, CustomThunk, which will require the user to provide a custom exec function. In this function, the parameter types can be checked and the appropriate function calls can be made based on those parameter types. The base UFUNCTION should never be called, and should assert or log an error if it is.
Default Parameter Values: Default Value for structs in blueprints or parameters: MakeStructureDefaultValue=»1.0,0.0,0.0″
Default function parameter values:
Execute in Editor: Add CallInEditor : — can also set GAllowActorScriptExecutionInEditor = true; — TGuardValue<bool> AutoRestore(GAllowActorScriptExecutionInEditor, true);
General#
CallableWithoutWorldContext:
Used for BlueprintCallable functions that have a WorldContext pin to indicate that the function can be called even if its class does not implement the GetWorld function.
CommutativeAssociativeBinaryOperator
Indicates that a BlueprintCallable function should use the Commutative Associative Binary node. This node lacks pin names, but features an «Add Pin» button that creates additional input pins.
ExpandEnumAsExecs=»Parameter»
For BlueprintCallable functions, this indicates that one input execution pin should be created for each entry in the enum used by the parameter. That the named parameter must be of an enumerated type recognized by the Engine via the UENUM tag.
UnsafeDuringActorConstruction
This function is not safe to call during Actor construction.
Structs#
HiddenByDefault
Pins in Make Struct and Break Struct nodes are hidden by default.
Enum Bitflags/Bitmasks#
By default, UENUM Bitflags use the enum value as the bit index. To change it to use the value as a mask,
Create the UENUM like this:
The property needs to be specified as:
Property Metadata Specifiers#
Property Meta Tag | Effect |
---|---|
AllowAbstract=»true/false» | Used for Subclass and SoftClass properties. Indicates whether abstract class types should be shown in the class picker. |
AllowedClasses=»Class1, Class2, ..» | Used for FSoftObjectPath properties. Comma delimited list that indicates the class type(s) of assets to be displayed in the Asset picker. |
AllowPreserveRatio | Used for FVector properties. It causes a ratio lock to be added when displaying this property in details panels. |
ArrayClamp=»ArrayProperty» | Used for integer properties. Clamps the valid values that can be entered in the UI to be between 0 and the length of the array property named. |
AssetBundles | Used for SoftObjectPtr or SoftObjectPath properties. List of Bundle names used inside Primary Data Assets to specify which Bundles this reference is part of. |
BlueprintBaseOnly | Used for Subclass and SoftClass properties. Indicates whether only Blueprint classes should be shown in the class picker. |
BlueprintCompilerGeneratedDefaults | Property defaults are generated by the Blueprint compiler and will not be copied when the CopyPropertiesForUnrelatedObjects function is called post-compile. |
ClampMin=»N» | Used for float and integer properties. Specifies the minimum value N that may be entered for the property. |
ClampMax=»N» | Used for float and integer properties. Specifies the maximum value N that may be entered for the property. |
ConfigHierarchyEditable | This property is serialized to a config (.ini) file, and can be set anywhere in the config hierarchy. |
ContentDir | Used by FDirectoryPath properties. Indicates that the path will be picked using the Slate-style directory picker inside the Content folder. |
DisplayName=»Property Name» | The name to display for this property, instead of the code-generated name. |
DisplayThumbnail=»true» | Indicates that the property is an Asset type and it should display the thumbnail of the selected Asset. |
EditCondition=»BooleanPropertyName» | Names a boolean property that is used to indicate whether editing of this property is disabled. Putting «!» before the property name inverts the test. |
EditFixedOrder | Keeps the elements of an array from being reordered by dragging. |
ExactClass=»true» | Used for FSoftObjectPath properties in conjunction with AllowedClasses. Indicates whether only the exact classes specified in AllowedClasses can be used, or if subclasses are also valid. |
ExposeFunctionCategories=»Category1, Category2, ..» | Specifies a list of categories whose functions should be exposed when building a function list in the Blueprint Editor. |
ExposeOnSpawn=»true» | Specifies whether the property should be exposed on a Spawn Actor node for this class type. |
FilePathFilter=»filetype» | Used by FFilePath properties. Indicates the path filter to display in the file picker. Common values include «uasset» and «umap», but these are not the only possible values. |
HideAlphaChannel | Used for FColor and FLinearColor properties. Indicates that the Alpha property should be hidden when displaying the property widget in the details. |
HideViewOptions | Used for Subclass and SoftClass properties. Hides the ability to change view options in the class picker. |
InlineEditConditionToggle | Signifies that the boolean property is only displayed inline as an edit condition toggle in other properties, and should not be shown on its own row. |
LongPackageName | Used by FDirectoryPath properties. Converts the path to a long package name. |
MakeEditWidget | Used for Transform or Rotator properties, or Arrays of Transforms or Rotators. Indicates that the property should be exposed in the viewport as a movable widget. |
ShowTreeView
PropertyMetadata Used for Subclass and StringClassReference properties. Shows the picker as a tree view instead of as a list
RelativePath
PropertyMetadata Used by FDirectoryPath properties. Indicates that the directory dialog will output a relative path when setting the property.
RelativeToGameContentDir
PropertyMetadata Used by FDirectoryPath properties. Indicates that the directory dialog will output a path relative to the game content directory when setting the property.
FStringassetreference: Restrict types of classes selectable in fstringassetreference properties: meta=(AllowedClasses=»LevelSequence») — Restrict to exact classes: ExactClass
Customize Array Of Structs header with TitleProperty meta tag:
Create Console Variable out of UPROPERTY:
Force a uproperty to not be clearable:
EditCondition: EditCondition & InlineEditConditionToggle & PinHiddenByDefault
Deprecate BP functions in UE4: Add _DEPRECATED to its name along with DeprecatedFunction metadata:
Special Purpose#
Sequencer#
SequencerTrackClass — Metadata to specify specialized sequencer track class for property
Gameplay Tags#
- GameplayTagFilter — Metadata to filter gameplay tags as function parameters and provide default value
- Categories — Use to specify tag hierarchy base for a gameplaytag property
FGameplayTagReferenceHelper — Helper struct for viewing tag references (assets that reference a tag). Drop this into a struct and set the OnGetgameplayStatName. A details customization will display a tree view of assets referencing the tag
FGameplayTagCreationWidgetHelper — Helper struct: drop this in another struct to get an embedded create new tag widget.
UsesHierarchy:
Indicates the class uses hierarchical data. Used to instantiate hierarchical editing features in Details panels.
Как отлаживать исходный код нереального двигателя
Убедитесь, что вы установили символы редактора для отладки в настройках установки для установки вашего двигателя.
Чтобы сделать это, от вашего запуска Epic Games Launcher откройте раскрывающееся окно рядом с текущей версией вашего двигателя, выберите параметры , установите для параметра «Редактор символов для отладки» значение true, а затем примените это изменение.
Я не уверен, что вам нужно будет восстановить файлы проекта после этого.
После того, как эти символы редактора установлены, вы сможете установить контрольные точки и трассировку в код двигателя.
Русские Блоги

1. Выберите режим отладки, обычно вы можете использовать DebugGame Editor.
2. Скомпилируйте программу и запустите ее, после запуска появится новое диалоговое окно UE4 (UE4 также перейдет в режим отладки)
Новый диалог UE4
3. Новое диалоговое окно UE4 отличается от старого, одно — это режим отладки, а другое — обычный режим редактирования.
4. Нажмите кнопку воспроизведения в UE4, чтобы войти в режим отладки, в это время вы можете установить отладку точки останова в VS
При закрытии программы в VS соответствующая программа UE4 также будет закрыта. Будьте осторожны, чтобы сэкономить заранее
Logs, Printing Messages To Yourself During Runtime
This page describes how to use the Unreal output log .
Other options are also discussed at the bottom of the page.
Accessing Logs
In-Game
To see logs you must run your game with -Log (you must create a shortcut to the Editor executable and add -Log to the end).
or use console command «showlog» in your game.
Within Editor (Play-In-Editor)
Log messages are sent to the ‘Output’ log which is accessible via Window -> Developer Tools -> Output Log.
If you are using the Editor and PIE, logging should be enabled by default due to the presence of «GameCommandLine=-log» in your Engine INI file. If no logging is visible, add the «-Log» command line option as per the instructions for In-Game logging above.
Quick Usage
This way you can log without the need of creating a custom category. Doing so will keep everything clean and sorted though.
Log Verbosity Levels
Log verbosity levels are used to more easily control what is being printed, allowing you to keep even the most detailed log statements in your code without having them spam output when you don’t want them to. Each log statement declares which log it belongs to and it’s verbosity level. Verbosity level is controlled on a per-log basis. Each log’s verbosity is controlled by four things: Compile-time verbosity, default verbosity, ini verbosity, and runtime-verbosity.
If a log statement is more verbose than it’s log’s compile time verbosity it won’t even be compiled into the game code. From there the log’s level is set to the default verbosity, which can then be overridden in the Engine.ini file, either of those can then be overridden from the command line (the runtime verbosity). Once the game (or editor) is running it may not be possible to change a log category’s verbosity (I am not sure, someone who knows please correct this).
Here are the verbosity levels available to use:
- Fatal
- Error
- Warning
- Display
- Log
- Verbose
- VeryVerbose
For the CompileTimeVerbosity parameter of DECLARE_LOG_CATEGORY_EXTERN it is also valid to use All (functionally the same as using VeryVerbose) or NoLogging (functionally the same as using Fatal).
Setting Up Your Own Log Category
Log Category Macros
The macros DECLARE_LOG_CATEGORY_EXTERN and DEFINE_LOG_CATEGORY go in YourGame.h and YourGame.cpp respectively.
The macro to declare a log category has three parameters. Each declared log category should have a corresponding defined log category in a cpp.
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.
The macro to define a log category takes only the name of the category.
Usage Example
You can have different log categories for different aspects of your game!
This gives you additional info, because UE_LOG prints out which log category is displaying a message.
Here is an example of where the different log levels start to become useful.
Say you’re often having trouble with a certain system in your game. In debugging you might want very detailed logs, but when you’ve finished debugging for now you know you might need those detailed logs later on, but they’re spamming the output. What do you do? Use different log levels.
MyGame.H
MyGame.CPP
MyClass.CPP
When you’re not working on this system all these log statements would absolutely flood your output, and even when you are working on it you might not want the level of detail that is putting out multiple logs per tick.
By using log levels you can simply change the verbosity in the category’s declaration, in the ini files, or on the command line to hide/reveal different layers of log statements as you need them. Ex: