unreal.VariantSet

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

Bases: unreal.Object

Variant Set

C++ Source:

  • Plugin: VariantManagerContent

  • Module: VariantManagerContent

  • File: VariantSet.h

add_variant(variant)None

Adds Variant to the VariantSet’s list of Variants

Parameters

variant (Variant) –

get_display_text()Text

Get Display Text

Returns

Return type

Text

get_num_variants()int32

Get Num Variants

Returns

Return type

int32

get_parent()LevelVariantSets

Get Parent

Returns

Return type

LevelVariantSets

get_thumbnail()Texture2D

Gets the thumbnail currently used for this variant set

Returns

Return type

Texture2D

get_variant(variant_index)Variant

Get Variant

Parameters

variant_index (int32) –

Returns

Return type

Variant

get_variant_by_name(variant_name)Variant

Get Variant by Name

Parameters

variant_name (str) –

Returns

Return type

Variant

remove_variant(variant)None

Removes Variant from VariantSet, if that is its parent

Parameters

variant (Variant) –

remove_variant_by_name(variant_name)None

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

Parameters

variant_name (str) –

set_display_text(new_display_text)None

Set Display Text

Parameters

new_display_text (Text) –

set_thumbnail_from_camera(world_context_object, camera_transform, fov_degrees=50.0, min_z=50.0, gamma=2.2)None

Set Thumbnail from Camera

Parameters
set_thumbnail_from_editor_viewport()None

Sets the thumbnail from the active editor viewport. Doesn’t do anything if the Editor is not available

set_thumbnail_from_file(file_path)None

Set Thumbnail from File

Parameters

file_path (str) –

set_thumbnail_from_texture(new_thumbnail)None

Sets the thumbnail to use for this variant set. Can receive nullptr to clear it

Parameters

new_thumbnail (Texture2D) –