Navigation
API > API/Plugins > API/Plugins/StateTreeModule
Property ref allows to get a pointer to selected property in StateTree. The expected type of the reference should be set in "RefType" meta specifier.
Meta specifiers for the type:
- RefType = "
" - Specifies a comma separated list of type of property to reference
- Supported types are: bool, byte, int32, int64, float, double, Name, String, Text, UObject pointers, and structs
- Structs and Objects must use full path name
- If multiple types are specified, GetMutablePtrTuple can be used to access the correct type
- IsRefToArray
- If specified, the reference is to an TArray
- CanRefToArray
- If specified, the reference can bind to a Reftype or TArray
- Optional
- If specified, the reference can be left unbound, otherwise the compiler report error if the reference is not bound
Example:
// Reference to float
FStateTreePropertyRef RefToFloat;
// Reference to FTestStructBase
FStateTreePropertyRef RefToTest;
// Reference to TArray
FStateTreePropertyRef RefToArrayOfTests;
// Reference to Vector, TArray
FStateTreePropertyRef RefToLocationLikeTypes;
| Name | FStateTreePropertyRef |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/StateTree/Source/StateTreeModule/Public/StateTreePropertyRef.h |
| Include Path | #include "StateTreePropertyRef.h" |
Syntax
USTRUCT ()
struct FStateTreePropertyRef
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FStateTreePropertyRef() |
StateTreePropertyRef.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FStateTreePropertyBindingCompiler | friend | StateTreePropertyRef.h | ||
| RefAccessIndex | FStateTreeIndex16 | StateTreePropertyRef.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T * GetMutablePtr
(
const FStateTreeExecutionContext& Context |
StateTreePropertyRef.h | ||
TTuple< T *... > GetMutablePtrTuple
(
const FStateTreeExecutionContext& Context |
StateTreePropertyRef.h | ||
std::conditional_t< bWithWriteAccess, T *, const T * > GetPtrFromStrongExecutionContext
(
const TStateTreeStrongExecutionContext< bWithWriteAccess >& Context |
StateTreePropertyRef.h | ||
std::conditional_t< bWithWriteAccess, TTuple< T *... >, TTuple< const T *... > > GetPtrTupleFromStrongExecutionContext
(
const TStateTreeStrongExecutionContext< bWithWriteAccess >& Context |
StateTreePropertyRef.h | ||
FStateTreeIndex16 GetRefAccessIndex() |
Used internally. | StateTreePropertyRef.h | |
bool SerializeFromMismatchedTag
(
const FPropertyTag& Tag, |
StateTreePropertyRef.h |