Navigation
API > API/Plugins > API/Plugins/StateTreeModule
References
| Module | StateTreeModule |
| Header | /Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Public/StateTreeTypes.h |
| Include | #include "StateTreeTypes.h" |
Syntax
USTRUCT (BlueprintType )
struct FStateTreeStructRef
Remarks
StateTree struct ref allows to get a reference/pointer to a specified type via property binding. It is useful for referencing larger properties to avoid copies of the data, or to be able to write to a bounds property.
The expected type of the reference should be set in "BaseStruct" meta tag.
Example:
USTRUCT() struct FAwesomeTaskInstanceData {
FStateTreeStructRef Data; };
if (const FAwesomeData* Awesome = InstanceData.Data.GetPtr
Variables
| Type | Name | Description | |
|---|---|---|---|
| FStructView | Data |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| const T & | Get () |
Returns const reference to the struct, this getter assumes that all data is valid. | |
| T & | GetMutable () |
Returns mutable reference to the struct, this getter assumes that all data is valid. | |
| T * | Returns mutable pointer to the struct, or nullptr if cast is not valid. | ||
| const T * | GetPtr () |
Returns const pointer to the struct, or nullptr if cast is not valid. | |
| const UScriptStruct * | |||
| bool | IsValid () |
||
| void | Set
(
FStructView NewData |
Sets the struct ref (used by property copy) |