unreal.VariantManagerLibrary

class unreal.VariantManagerLibrary(outer=None, name='None')

Bases: unreal.BlueprintFunctionLibrary

Library of functions that can be used by the Python API to trigger VariantManager operations

C++ Source:

  • Plugin: VariantManager

  • Module: VariantManager

  • File: VariantManagerBlueprintLibrary.h

classmethod add_actor_binding(variant, actor)None

Binds the Actor to the Variant, internally creating a VariantObjectBinding

Parameters
classmethod add_dependency(variant, dependency) -> (int32, dependency=VariantDependency)

Add Dependency

Parameters
Returns

dependency (VariantDependency):

Return type

VariantDependency

classmethod add_variant(variant_set, variant)None

Adds Variant to the VariantSet’s list of Variants

Parameters
classmethod add_variant_set(level_variant_sets, variant_set)None

Adds VariantSet to the LevelVariantSets’ list of VariantSets

Parameters
classmethod apply(prop_val)None

Applies the recorded data from PropVal to the actor from which it was captured

Parameters

prop_val (PropertyValue) –

classmethod capture_property(variant, actor, property_path)PropertyValue

Finds the actor binding to Actor within Variant and tries capturing a property with PropertyPath Returns the captured UPropertyValue if succeeded or nullptr if it failed.

Parameters
Returns

Return type

PropertyValue

classmethod create_level_variant_sets_actor(level_variant_sets_asset)LevelVariantSetsActor

Creates a new ALevelVariantSetsActor in the current scene and assigns LevelVariantSetsAsset to it

Parameters

level_variant_sets_asset (LevelVariantSets) –

Returns

Return type

LevelVariantSetsActor

classmethod create_level_variant_sets_asset(asset_name, asset_path)LevelVariantSets

Creates a new LevelVariantSetsAsset named AssetName (e.g. ‘MyLevelVariantSets’) in the content path AssetPath (e.g. ‘/Game’)

Parameters
  • asset_name (str) –

  • asset_path (str) –

Returns

Return type

LevelVariantSets

classmethod delete_dependency(variant, index)None

Delete Dependency

Parameters
  • variant (Variant) –

  • index (int32) –

classmethod get_capturable_properties(actor_or_class)

Returns a property path for all the properties we can capture for an actor. Will also handle receiving the actor’s class instead.

Parameters

actor_or_class (Object) –

Returns

Return type

Array(str)

classmethod get_captured_properties(variant, actor)

Returns which properties have been captured for this actor in Variant

Parameters
Returns

Return type

Array(PropertyValue)

classmethod get_property_type_string(prop_val)str

This allows the scripting language to get the type of the C++ property its dealing with

Parameters

prop_val (PropertyValue) –

Returns

Return type

str

classmethod get_value_bool(property_)bool

Get Value Bool

Parameters

property (PropertyValue) –

Returns

Return type

bool

classmethod get_value_color(property_)Color

Get Value Color

Parameters

property (PropertyValue) –

Returns

Return type

Color

classmethod get_value_float(property_)float

Get Value Float

Parameters

property (PropertyValue) –

Returns

Return type

float

classmethod get_value_int(property_)int32

Get Value Int

Parameters

property (PropertyValue) –

Returns

Return type

int32

classmethod get_value_int_point(property_)IntPoint

Get Value Int Point

Parameters

property (PropertyValue) –

Returns

Return type

IntPoint

classmethod get_value_linear_color(property_)LinearColor

Get Value Linear Color

Parameters

property (PropertyValue) –

Returns

Return type

LinearColor

classmethod get_value_object(property_)Object

Get Value Object

Parameters

property (PropertyValue) –

Returns

Return type

Object

classmethod get_value_quat(property_)Quat

Get Value Quat

Parameters

property (PropertyValue) –

Returns

Return type

Quat

classmethod get_value_rotator(property_)Rotator

Get Value Rotator

Parameters

property (PropertyValue) –

Returns

Return type

Rotator

classmethod get_value_string(property_)str

Get Value String

Parameters

property (PropertyValue) –

Returns

Return type

str

classmethod get_value_vector(property_)Vector

Get Value Vector

Parameters

property (PropertyValue) –

Returns

Return type

Vector

classmethod get_value_vector2d(property_)Vector2D

Get Value Vector 2D

Parameters

property (PropertyValue) –

Returns

Return type

Vector2D

classmethod get_value_vector4(property_)Vector4

Get Value Vector 4

Parameters

property (PropertyValue) –

Returns

Return type

Vector4

classmethod record(prop_val)None

Records new data for PropVal from the actor from which it was captured

Parameters

prop_val (PropertyValue) –

classmethod remove_actor_binding(variant, actor)None

Removes an actor binding to Actor from Variant, if it exists

Parameters
classmethod remove_actor_binding_by_name(variant, actor_name)None

Looks for an actor binding to an actor with ActorLabel within Variant and removes it, if it exists

Parameters
classmethod remove_captured_property(variant, actor, property_)None

Removes a property capture from an actor binding within Variant, if it exists

Parameters
classmethod remove_captured_property_by_name(variant, actor, property_path)None

Removes property capture with PropertyPath from Actor’s binding within Variant, if it exists

Parameters
classmethod remove_variant(variant_set, variant)None

Removes Variant from VariantSet, if that is its parent

Parameters
classmethod remove_variant_by_name(variant_set, variant_name)None

Looks for a variant with VariantName within VariantSet and removes it, if it exists

Parameters
classmethod remove_variant_set(level_variant_sets, variant_set)None

Removes VariantSet from LevelVariantSets, if that is its parent

Parameters
classmethod remove_variant_set_by_name(level_variant_sets, variant_set_name)None

Looks for a variant set with VariantSetName within LevelVariantSets and removes it, if it exists

Parameters
classmethod set_dependency(variant, index, dependency)VariantDependency

Set Dependency

Parameters
Returns

dependency (VariantDependency):

Return type

VariantDependency

classmethod set_value_bool(property_, value)None

Set Value Bool

Parameters
classmethod set_value_color(property_, value)None

Set Value Color

Parameters
classmethod set_value_float(property_, value)None

Set Value Float

Parameters
classmethod set_value_int(property_, value)None

Set Value Int

Parameters
classmethod set_value_int_point(property_, value)None

Set Value Int Point

Parameters
classmethod set_value_linear_color(property_, value)None

Set Value Linear Color

Parameters
classmethod set_value_object(property_, value)None

Set Value Object

Parameters
classmethod set_value_quat(property_, value)None

Set Value Quat

Parameters
classmethod set_value_rotator(property_, value)None

Set Value Rotator

Parameters
classmethod set_value_string(property_, value)None

Set Value String

Parameters
classmethod set_value_vector(property_, value)None

Set Value Vector

Parameters
classmethod set_value_vector2d(property_, value)None

Set Value Vector 2D

Parameters
classmethod set_value_vector4(property_, value)None

Set Value Vector 4

Parameters