unreal.KismetArrayLibrary

class unreal.KismetArrayLibrary(outer: Object | None = None, name: Name | str = 'None')

Bases: BlueprintFunctionLibrary

Kismet Array Library

C++ Source:

  • Module: Engine

  • File: KismetArrayLibrary.h

classmethod filter_array(target_array, filter_class) Array[Actor]

*Filter an array based on a Class derived from Actor. * *

Parameters:
  • target_array (Array[Actor]) – The array to filter from *

  • filter_class (type(Class)) – The Actor sub-class type that acts as the filter, only objects derived from it will be returned. *

Returns:

filtered_array (Array[Actor]):

Return type:

Array[Actor]

classmethod sort_byte_array(target_array, stable_sort=False, sort_order=ArraySortOrder.ASCENDING) Array[uint8]

Sorts an array of bytes.

Parameters:
  • target_array (Array[uint8]) – The array to sort.

  • stable_sort (bool) – If a stable sort should be used. This preserves the order of identical elements, but is slower.

  • sort_order (ArraySortOrder) – If the array should be sorted in ascending or descending order.

Returns:

target_array (Array[uint8]): The array to sort.

Return type:

Array[uint8]

classmethod sort_float_array(target_array, stable_sort=False, sort_order=ArraySortOrder.ASCENDING) Array[double]

Sorts an array of doubles.

Parameters:
  • target_array (Array[double]) – The array to sort.

  • stable_sort (bool) – If a stable sort should be used. This preserves the order of identical elements, but is slower.

  • sort_order (ArraySortOrder) – If the array should be sorted in ascending or descending order.

Returns:

target_array (Array[double]): The array to sort.

Return type:

Array[double]

classmethod sort_int64_array(target_array, stable_sort=False, sort_order=ArraySortOrder.ASCENDING) Array[int64]

Sorts an array of 64-bit integers.

Parameters:
  • target_array (Array[int64]) – The array to sort.

  • stable_sort (bool) – If a stable sort should be used. This preserves the order of identical elements, but is slower.

  • sort_order (ArraySortOrder) – If the array should be sorted in ascending or descending order.

Returns:

target_array (Array[int64]): The array to sort.

Return type:

Array[int64]

classmethod sort_int_array(target_array, stable_sort=False, sort_order=ArraySortOrder.ASCENDING) Array[int32]

Sorts an array of integers.

Parameters:
  • target_array (Array[int32]) – The array to sort.

  • stable_sort (bool) – If a stable sort should be used. This preserves the order of identical elements, but is slower.

  • sort_order (ArraySortOrder) – If the array should be sorted in ascending or descending order.

Returns:

target_array (Array[int32]): The array to sort.

Return type:

Array[int32]

classmethod sort_name_array(target_array, stable_sort=False, lexical_sort=True, sort_order=ArraySortOrder.ASCENDING) Array[Name]

Sorts an array of FNames.

Parameters:
  • target_array (Array[Name]) – The array to sort.

  • stable_sort (bool) – If a stable sort should be used. This preserves the order of identical elements, but is slower.

  • lexical_sort (bool) – If the names should be sorted based on the string value of the name rather than the comparison index. This is slower when enabled.

  • sort_order (ArraySortOrder) – If the array should be sorted in ascending or descending order.

Returns:

target_array (Array[Name]): The array to sort.

Return type:

Array[Name]

classmethod sort_string_array(target_array, stable_sort=False, sort_order=ArraySortOrder.ASCENDING) Array[str]

Sorts an array of strings alphabetically.

Parameters:
  • target_array (Array[str]) – The array to sort.

  • stable_sort (bool) – If a stable sort should be used. This preserves the order of identical elements, but is slower.

  • sort_order (ArraySortOrder) – If the array should be sorted in ascending or descending order.

Returns:

target_array (Array[str]): The array to sort.

Return type:

Array[str]