Navigation
API > API/Plugins > API/Plugins/VariantManagerContent
| Name | UVariant |
| Type | class |
| Header File | /Engine/Plugins/Enterprise/VariantManagerContent/Source/VariantManagerContent/Public/Variant.h |
| Include Path | #include "Variant.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType)
class UVariant : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVariant
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UVariant
(
const FObjectInitializer& ObjectInitializer |
Variant.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnVariantChanged | TMulticastDelegate_OneParam< void, UVariant * > | Variant.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| OnDependenciesUpdated | FOnVariantChanged | Broadcast whenever we add/remove/modify a variant dependency. | Variant.h |
| OnThumbnailUpdated | FOnVariantChanged | Broadcast whenever we modify a variant thumbnail. | Variant.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FVariantImpl | friend | Variant.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bTriedRestoringOldThumbnail | bool | Whether we already tried restoring a thumbnail from the actual package (backwards compatibility) | Variant.h | |
| Dependencies | TArray< FVariantDependency > | Variant.h | ||
| DisplayText | FText | Variant.h | ||
| ObjectBindings | TArray< TObjectPtr< UVariantObjectBinding > > | Variant.h | ||
| Thumbnail | TObjectPtr< UTexture2D > | Variant.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddBindings
(
const TArray< UVariantObjectBinding* >& NewBindings, |
In case of a duplicate binding these will destroy the older bindings. | Variant.h | |
int32 AddDependency
(
FVariantDependency& Dependency |
Variant.h |
|
|
void DeleteDependency
(
int32 Index |
Variant.h |
|
|
AActor * GetActor
(
int32 ActorIndex |
Variant.h |
|
|
UVariantObjectBinding * GetBindingByName
(
const FString& ActorName |
Variant.h | ||
int32 GetBindingIndex
(
UVariantObjectBinding* Binding |
Variant.h | ||
const TArray< UVariantObjectBinding * > & GetBindings() |
Variant.h | ||
FVariantDependency & GetDependency
(
int32 Index |
Returning by reference in blueprint doesn't seem to work if we want to later modify the FVariantDependency, so here we leave the return type without UPARAM(ref) so C++ code can use it as ref, while this function in blueprint returns by value | Variant.h |
|
TArray< UVariant * > GetDependents
(
ULevelVariantSets* LevelVariantSets, |
Returns all the variants that have this variant as a dependency. | Variant.h |
|
FText GetDisplayText() |
Variant.h |
|
|
int32 GetNumActors() |
Variant.h |
|
|
int32 GetNumDependencies() |
Variant.h |
|
|
UVariantSet * GetParent() |
Variant.h |
|
|
UTexture2D * GetThumbnail() |
Gets the thumbnail currently used for this variant. | Variant.h |
|
bool IsActive() |
Returns true if none of our properties are dirty. | Variant.h |
|
bool IsValidDependency
(
const UVariant* Other |
Returns if we can safely trigger Other as a dependency without the danger of cycles. | Variant.h | |
void RemoveBindings
(
const TArray< UVariantObjectBinding* >& Bindings |
Variant.h | ||
void SetDependency
(
int32 Index, |
Variant.h |
|
|
void SetDisplayText
(
const FText& NewDisplayText |
Variant.h |
|
|
void SetThumbnailFromCamera
(
UObject* WorldContextObject, |
Variant.h |
|
|
void SetThumbnailFromEditorViewport() |
Sets the thumbnail from the active editor viewport. Doesn't do anything if the Editor is not available. | Variant.h |
|
void SetThumbnailFromFile
(
FString FilePath |
Variant.h |
|
|
void SetThumbnailFromTexture
(
UTexture2D* NewThumbnail |
Sets the thumbnail to use for this variant. Can receive nullptr to clear it. | Variant.h |
|
void SwitchOn() |
Variant.h |
|
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Serialize
(
FArchive& Ar |
Variant.h |