unreal.GameplayTagLibrary¶
- class unreal.GameplayTagLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibraryBlueprint 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:
tag_container (GameplayTagContainer)
tag (GameplayTag) – The tag to add to the container
- Returns:
tag_container (GameplayTagContainer):
- Return type:
- 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:
out_tag_container (GameplayTagContainer) – The container that will be appended too.
tag_container (GameplayTagContainer) – The container to append.
- Returns:
out_tag_container (GameplayTagContainer): The container that will be appended too.
- Return type:
- 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:
- classmethod conv_object_to_gameplay_tag_asset_interface(object) GameplayTagAssetInterface¶
Converts a UObject to a GameplayTagAssetInterface. This specialty Autocast function exists so we can auto-convert the GameplayTagAssetInterface member functions to static Blueprint functions using redirects.
- Parameters:
object (Object)
- Return type:
- 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:
tag_container (GameplayTagContainer) – Container to check if it matches all of the tags in the other container
tag_query (GameplayTagQuery) – Query to match against
- Returns:
True if the container matches the query, false otherwise.
- Return type:
- classmethod equal_equal_gameplay_tag(a, b) bool¶
Returns true if the values are equal (A == B)
- Parameters:
a (GameplayTag)
b (GameplayTag)
- Return type:
- classmethod equal_equal_gameplay_tag_container(a, b) bool¶
Returns true if the values are equal (A == B)
- Parameters:
- Return type:
- classmethod filter(tag_container, other_container, exact_match) GameplayTagContainer¶
Returns a filtered version of this container, returns all tags that match against any of the tags in OtherContainer
- Parameters:
tag_container (GameplayTagContainer)
other_container (GameplayTagContainer) – The Container to filter 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:
A FGameplayTagContainer containing the filtered tags
- Return type:
- 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.
- 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:
- 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:
- 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_owned_gameplay_tags(tag_container_interface) GameplayTagContainer¶
- Parameters:
tag_container_interface (GameplayTagAssetInterface)
- Returns:
the tags currently owned by the TagContainerInterface object
- Return type:
- classmethod get_tag_name(gameplay_tag) Name¶
Returns FName of this tag
- Parameters:
gameplay_tag (GameplayTag)
- Return type:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- classmethod make_gameplay_tag_container_from_tag(single_tag) GameplayTagContainer¶
Creates a FGameplayTagContainer containing a single tag
- Parameters:
single_tag (GameplayTag)
- Return type:
- 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:
- classmethod make_gameplay_tag_query_match_all_tags(tags) GameplayTagQuery¶
Creates a literal FGameplayTagQuery with a prepopulated AllTagsMatch expression
- Parameters:
tags (GameplayTagContainer) – value to set the FGameplayTagQuery expression
- Returns:
The literal FGameplayTagQuery
- Return type:
- classmethod make_gameplay_tag_query_match_any_tags(tags) GameplayTagQuery¶
Creates a literal FGameplayTagQuery with a prepopulated AnyTagsMatch expression
- Parameters:
tags (GameplayTagContainer) – value to set the FGameplayTagQuery expression
- Returns:
The literal FGameplayTagQuery
- Return type:
- classmethod make_gameplay_tag_query_match_no_tags(tags) GameplayTagQuery¶
Creates a literal FGameplayTagQuery with a prepopulated NoTagsMatch expression
- Parameters:
tags (GameplayTagContainer) – value to set the FGameplayTagQuery expression
- Returns:
The literal FGameplayTagQuery
- Return type:
- classmethod make_literal_gameplay_tag(value) GameplayTag¶
Creates a literal FGameplayTag
- Parameters:
value (GameplayTag)
- Return type:
- classmethod make_literal_gameplay_tag_container(value) GameplayTagContainer¶
Creates a literal FGameplayTagContainer
- Parameters:
value (GameplayTagContainer)
- Return type:
- 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:
- 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:
- classmethod not_equal_gameplay_tag(a, b) bool¶
Returns true if the values are not equal (A != B)
- Parameters:
a (GameplayTag)
b (GameplayTag)
- Return type:
- classmethod not_equal_gameplay_tag_container(a, b) bool¶
Returns true if the values are not equal (A != B)
- Parameters:
- Return type:
- 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:
tag_container (GameplayTagContainer)
tag (GameplayTag) – The tag to add to the container
- Returns:
tag_container (GameplayTagContainer):
- Return type:
GameplayTagContainer or None