Skip to content

Added gameplay tag container to the interaction option #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ void UGBFInteractableComponent::OnInteractableActorLeftRadius( AActor * actor )
K2_OnInteractableActorLeftRadius( actor );
}

bool UGBFInteractableComponent::HasInteractionOptionWithTag( FGameplayTag gameplay_tag ) const
{
return InteractionOptionContainer.GetOptions().FindByPredicate( [ & ]( const auto & option ) {
return option.Tags.HasTagExact( gameplay_tag );
} ) != nullptr;
}

void UGBFInteractableComponent::K2_OnInteractableActorEnteredRadius_Implementation( AActor * actor )
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class GAMEBASEFRAMEWORK_API UGBFInteractableComponent : public UActorComponent
UFUNCTION( BlueprintPure )
bool HasInteractableActorsInRadius() const;

UFUNCTION( BlueprintPure )
bool HasInteractionOptionWithTag( FGameplayTag gameplay_tag ) const;

protected:
UFUNCTION( BlueprintNativeEvent, DisplayName = "OnInteractableActorEnteredRadius", meta = ( ForceAsFunction ) )
void K2_OnInteractableActorEnteredRadius( AActor * actor );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ struct FGBFInteractionOption
UPROPERTY( EditAnywhere, BlueprintReadOnly )
FGameplayTagRequirements InstigatorTagRequirements;

UPROPERTY( EditAnywhere, BlueprintReadOnly )
FGameplayTagContainer Tags;

UPROPERTY( EditAnywhere, BlueprintReadOnly )
TObjectPtr< const UInputAction > InputAction = nullptr;

Expand Down