unreal.GameplayTagLibrary

class unreal.GameplayTagLibrary(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: BlueprintFunctionLibrary

Blueprint Gameplay Tag Library

C++ Source:

  • Module: GameplayTags

  • File: BlueprintGameplayTagLibrary.h

classmethod add_gameplay_tag(tag_container, tag) GameplayTagContainer

Adds a single tag to the passed in tag container

Parameters:
Returns:

tag_container (GameplayTagContainer):

Return type:

GameplayTagContainer

classmethod add_gameplay_tag_to_container(tag_container: GameplayTagContainer, tag: GameplayTag) GameplayTagContainer

deprecated: ‘add_gameplay_tag_to_container’ was renamed to ‘add_gameplay_tag’.

classmethod append_gameplay_tag_containers(out_tag_container, tag_container) GameplayTagContainer

Appends all tags in the InTagContainer to InOutTagContainer

Parameters:
Returns:

out_tag_container (GameplayTagContainer): The container that will be appended too.

Return type:

GameplayTagContainer

classmethod break_gameplay_tag_container(gameplay_tag_container) Array[GameplayTag]

Breaks tag container into explicit array of tags

Parameters:

gameplay_tag_container (GameplayTagContainer) –

Returns:

gameplay_tags (Array[GameplayTag]):

Return type:

Array[GameplayTag]

classmethod do_gameplay_tags_match(tag_one: GameplayTag, tag_two: GameplayTag, exact_match: bool) bool

deprecated: ‘do_gameplay_tags_match’ was renamed to ‘matches_tag’.

classmethod does_container_have_tag(tag_container: GameplayTagContainer, tag: GameplayTag, exact_match: bool) bool

deprecated: ‘does_container_have_tag’ was renamed to ‘has_tag’.

classmethod does_container_match_all_tags_in_container(tag_container: GameplayTagContainer, other_container: GameplayTagContainer, exact_match: bool) bool

deprecated: ‘does_container_match_all_tags_in_container’ was renamed to ‘has_all_tags’.

classmethod does_container_match_any_tags_in_container(tag_container: GameplayTagContainer, other_container: GameplayTagContainer, exact_match: bool) bool

deprecated: ‘does_container_match_any_tags_in_container’ was renamed to ‘has_any_tags’.

classmethod does_container_match_tag_query(tag_container, tag_query) bool

Check if the specified tag container matches the given Tag Query

Parameters:
Returns:

True if the container matches the query, false otherwise.

Return type:

bool

classmethod equal_equal_gameplay_tag(a, b) bool

Returns true if the values are equal (A == B)

Parameters:
Return type:

bool

classmethod equal_equal_gameplay_tag_container(a, b) bool

Returns true if the values are equal (A == B)

Parameters:
Return type:

bool

classmethod get_all_actors_of_class_matching_tag_query(world_context_object, actor_class, gameplay_tag_query) Array[Actor]

Get an array of all actors of a specific class (or subclass of that class) which match the specified gameplay tag query.

Parameters:
  • world_context_object (Object) –

  • actor_class (type(Class)) – Class of actors to fetch

  • gameplay_tag_query (GameplayTagQuery) – Query to match against

Returns:

out_actors (Array[Actor]):

Return type:

Array[Actor]

classmethod get_debug_string_from_gameplay_tag(gameplay_tag) str

Returns an FString representation of a gameplay tag for debugging purposes.

Parameters:

gameplay_tag (GameplayTag) – The tag to get the debug string from.

Return type:

str

classmethod get_debug_string_from_gameplay_tag_container(tag_container) str

Returns an FString listing all of the gameplay tags in the tag container for debugging purposes.

Parameters:

tag_container (GameplayTagContainer) – The tag container to get the debug string from.

Return type:

str

classmethod get_num_gameplay_tags_in_container(tag_container) int32

Get the number of gameplay tags in the specified container

Parameters:

tag_container (GameplayTagContainer) – Tag container to get the number of tags from

Returns:

The number of tags in the specified container

Return type:

int32

classmethod get_tag_name(gameplay_tag) Name

Returns FName of this tag

Parameters:

gameplay_tag (GameplayTag) –

Return type:

Name

classmethod has_all_tags(tag_container, other_container, exact_match) bool

Check if the specified tag container has ALL of the tags in the other container

Parameters:
  • tag_container (GameplayTagContainer) – Container to check if it matches all of the tags in the other container

  • other_container (GameplayTagContainer) – Container to check against. If this is empty, the check will succeed

  • exact_match (bool) – If true, the tag has to be exactly present, if false then TagContainer will include it’s parent tags while matching

Returns:

True if the container has ALL of the tags in the other container

Return type:

bool

classmethod has_any_tags(tag_container, other_container, exact_match) bool

Check if the specified tag container has ANY of the tags in the other container

Parameters:
  • tag_container (GameplayTagContainer) – Container to check if it matches any of the tags in the other container

  • other_container (GameplayTagContainer) – Container to check against.

  • exact_match (bool) – If true, the tag has to be exactly present, if false then TagContainer will include it’s parent tags while matching

Returns:

True if the container has ANY of the tags in the other container

Return type:

bool

classmethod has_tag(tag_container, tag, exact_match) bool

Check if the tag container has the specified tag

Parameters:
  • tag_container (GameplayTagContainer) – Container to check for the tag

  • tag (GameplayTag) – Tag to check for in the container

  • exact_match (bool) – If true, the tag has to be exactly present, if false then TagContainer will include it’s parent tags while matching

Returns:

True if the container has the specified tag, false if it does not

Return type:

bool

classmethod is_gameplay_tag_valid(gameplay_tag) bool

Returns true if the passed in gameplay tag is non-null

Parameters:

gameplay_tag (GameplayTag) –

Return type:

bool

classmethod is_tag_query_empty(tag_query) bool

Check if the specified tag query is empty

Parameters:

tag_query (GameplayTagQuery) – Query to check

Returns:

True if the query is empty, false otherwise.

Return type:

bool

classmethod make_gameplay_tag_container_from_array(gameplay_tags) GameplayTagContainer

Creates a FGameplayTagContainer from the array of passed in tags

Parameters:

gameplay_tags (Array[GameplayTag]) –

Return type:

GameplayTagContainer

classmethod make_gameplay_tag_container_from_tag(single_tag) GameplayTagContainer

Creates a FGameplayTagContainer containing a single tag

Parameters:

single_tag (GameplayTag) –

Return type:

GameplayTagContainer

classmethod make_gameplay_tag_query(tag_query) GameplayTagQuery

Creates a literal FGameplayTagQuery

Parameters:

tag_query (GameplayTagQuery) – value to set the FGameplayTagQuery to

Returns:

The literal FGameplayTagQuery

Return type:

GameplayTagQuery

classmethod make_literal_gameplay_tag(value) GameplayTag

Creates a literal FGameplayTag

Parameters:

value (GameplayTag) –

Return type:

GameplayTag

classmethod make_literal_gameplay_tag_container(value) GameplayTagContainer

Creates a literal FGameplayTagContainer

Parameters:

value (GameplayTagContainer) –

Return type:

GameplayTagContainer

classmethod matches_any_tags(tag_one, other_container, exact_match) bool

Determine if TagOne matches against any tag in OtherContainer

Parameters:
  • tag_one (GameplayTag) – Tag to check for match

  • other_container (GameplayTagContainer) – Container to check against.

  • exact_match (bool) – If true, the tag has to be exactly present, if false then TagOne will include it’s parent tags while matching

Returns:

True if TagOne matches any tags explicitly present in OtherContainer

Return type:

bool

classmethod matches_tag(tag_one, tag_two, exact_match) bool

Determine if TagOne matches against TagTwo

Parameters:
  • tag_one (GameplayTag) – Tag to check for match

  • tag_two (GameplayTag) – Tag to check match against

  • exact_match (bool) – If true, the tag has to be exactly present, if false then TagOne will include it’s parent tags while matching

Returns:

True if TagOne matches TagTwo

Return type:

bool

classmethod not_equal_gameplay_tag(a, b) bool

Returns true if the values are not equal (A != B)

Parameters:
Return type:

bool

classmethod not_equal_gameplay_tag_container(a, b) bool

Returns true if the values are not equal (A != B)

Parameters:
Return type:

bool

classmethod remove_gameplay_tag(tag_container, tag) GameplayTagContainer or None

Remove a single tag from the passed in tag container, returns true if found

Parameters:
Returns:

tag_container (GameplayTagContainer):

Return type:

GameplayTagContainer or None