Navigation
API > API/Plugins > API/Plugins/WorldConditions
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UWorldConditionSchema
- USmartObjectWorldConditionSchema
- UWorldConditionTestCachedSchema
- UWorldConditionTestSchema
References
| Module | WorldConditions |
| Header | /Engine/Plugins/Runtime/WorldConditions/Source/WorldConditions/Public/WorldConditionSchema.h |
| Include | #include "WorldConditionSchema.h" |
Syntax
UCLASS&40;&41;
class UWorldConditionSchema : public UObject
Remarks
Describes the context data and allowed world conditions for a specific use case.
Each schema adds the context data they can provide in their class constructor. This allows the derived classes to add more data as needed.
UCLASS() class UFantasticWorldConditionSchema : public UWorldConditionSchema {
public: UFantasticWorldConditionSchema::UFantasticWorldConditionSchema(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { ActorRef = AddContextDataDesc(TEXT("Actor"), AActor::StaticClass(), EWorldConditionContextDataType::Dynamic); }
// For convenience, when the schema is known, makes it easy to set the context data. FWorldConditionContextDataRef GetActorRef() const { return ActorRef; }
protected: // Filter condition classes that make sense for this context. virtual bool IsStructAllowed(const UScriptStruct* InScriptStruct) const override; { return Super::IsStructAllowed(InScriptStruct) || InScriptStruct->IsChildOf(TBaseStructure
FWorldConditionContextDataRef ActorRef; };
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FWorldConditionContextDataDesc > | ContextDataDescs | All context data descriptors. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FWorldConditionContextDataRef | AddContextDataDesc
(
const FName InName, |
Adds a context data descriptor and returns reference to it. | |
| const FWorldConditionContextDataDesc & | GetContextDataDescByIndex
(
const int32 Index |
||
| const FWorldConditionContextDataDesc * | GetContextDataDescByName
(
const FName DataName, |
||
| const FWorldConditionContextDataDesc * | GetContextDataDescByRef
(
const FWorldConditionContextDataRef& Ref |
||
| TConstArrayView< FWorldConditionContextDataDesc > | |||
| int32 | GetContextDataIndexByName
(
const FName DataName, |
||
| FWorldConditionContextDataRef | GetContextDataRefByName
(
const FName DataName, |
||
| EWorldConditionContextDataType | GetContextDataTypeByIndex
(
const int32 Index |
||
| EWorldConditionContextDataType | GetContextDataTypeByRef
(
const FWorldConditionContextDataRef& Ref |
||
| bool | IsStructAllowed
(
const UScriptStruct* InScriptStruct |
||
| TEnableIf< TIsDerivedFrom< T, UObject >::IsDerived, bool >::Type | Resolves the index of the context data reference to an Object context data, based on the name in the reference and the type from the template. | ||
| TEnableIfTIsDerivedFrom< T, UObject >::IsDerived, bool >::Type | Resolves the index of the context data reference to a Struct context data, based on the name in the reference and the type from the template. |