UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ToolBuilderUtil Namespace Reference

Functions

INTERACTIVETOOLSFRAMEWORK_API int CountComponents (const FToolBuilderState &InputState, const TFunction< bool(UActorComponent *)> &Predicate)
 
INTERACTIVETOOLSFRAMEWORK_API UActorComponentFindFirstComponent (const FToolBuilderState &InputState, const TFunction< bool(UActorComponent *)> &Predicate)
 
INTERACTIVETOOLSFRAMEWORK_API TArray< UActorComponent * > FindAllComponents (const FToolBuilderState &InputState, const TFunction< bool(UActorComponent *)> &Predicate)
 
template<typename ComponentType >
int CountSelectedComponentsOfType (const FToolBuilderState &InputState)
 
template<typename ComponentType >
ComponentType * FindFirstComponentOfType (const FToolBuilderState &InputState)
 
INTERACTIVETOOLSFRAMEWORK_API void EnumerateComponents (const FToolBuilderState &InputState, TFunctionRef< void(UActorComponent *)> ComponentFunc)
 
INTERACTIVETOOLSFRAMEWORK_API int32 CountActors (const FToolBuilderState &InputState, const TFunction< bool(AActor *)> &Predicate)
 
INTERACTIVETOOLSFRAMEWORK_API AActorFindFirstActor (const FToolBuilderState &InputState, const TFunction< bool(AActor *)> &Predicate)
 
INTERACTIVETOOLSFRAMEWORK_API TArray< AActor * > FindAllActors (const FToolBuilderState &InputState, const TFunction< bool(AActor *)> &Predicate)
 
template<typename ActorType >
int CountSelectedActorsOfType (const FToolBuilderState &InputState)
 
template<typename ActorType >
ActorType * FindFirstActorOfType (const FToolBuilderState &InputState)
 
INTERACTIVETOOLSFRAMEWORK_API bool ComponentTypeCouldHaveUVs (const UActorComponent &Component)
 
INTERACTIVETOOLSFRAMEWORK_API bool IsVolume (const UActorComponent &Component)
 

Detailed Description

Helper functions that can be used in InteractiveToolBuilder implementations

Function Documentation

◆ ComponentTypeCouldHaveUVs()

bool ToolBuilderUtil::ComponentTypeCouldHaveUVs ( const UActorComponent Component)

Determine if component support UVs.

◆ CountActors()

int32 ToolBuilderUtil::CountActors ( const FToolBuilderState InputState,
const TFunction< bool(AActor *)> &  Predicate 
)

Count number of selected Actors that pass predicate.

◆ CountComponents()

int ToolBuilderUtil::CountComponents ( const FToolBuilderState InputState,
const TFunction< bool(UActorComponent *)> &  Predicate 
)

Count number of selected components that pass predicate. If Component selection is not empty, returns that count, otherwise counts in all selected Actors

◆ CountSelectedActorsOfType()

template<typename ActorType >
int ToolBuilderUtil::CountSelectedActorsOfType ( const FToolBuilderState InputState)

Count number of selected Actors of given type.

◆ CountSelectedComponentsOfType()

template<typename ComponentType >
int ToolBuilderUtil::CountSelectedComponentsOfType ( const FToolBuilderState InputState)

Count number of components of given type. If Component selection is not empty, returns that count, otherwise counts in all selected Actors

◆ EnumerateComponents()

void ToolBuilderUtil::EnumerateComponents ( const FToolBuilderState InputState,
TFunctionRef< void(UActorComponent *)>  ComponentFunc 
)

◆ FindAllActors()

TArray< AActor * > ToolBuilderUtil::FindAllActors ( const FToolBuilderState InputState,
const TFunction< bool(AActor *)> &  Predicate 
)

First all Actors that pass predicate. Searches Actors selection list.

◆ FindAllComponents()

TArray< UActorComponent * > ToolBuilderUtil::FindAllComponents ( const FToolBuilderState InputState,
const TFunction< bool(UActorComponent *)> &  Predicate 
)

First all components that passes predicate. Searches Components selection list first, then all Actors

◆ FindFirstActor()

AActor * ToolBuilderUtil::FindFirstActor ( const FToolBuilderState InputState,
const TFunction< bool(AActor *)> &  Predicate 
)

First first available Actor that passes predicate. Searches Actors selection list.

◆ FindFirstActorOfType()

template<typename ActorType >
ActorType * ToolBuilderUtil::FindFirstActorOfType ( const FToolBuilderState InputState)

Find first first available Actor of given type, or return nullptr if not found

◆ FindFirstComponent()

UActorComponent * ToolBuilderUtil::FindFirstComponent ( const FToolBuilderState InputState,
const TFunction< bool(UActorComponent *)> &  Predicate 
)

First first available component that passes predicate. Searches Components selection list first, then all Actors

◆ FindFirstComponentOfType()

template<typename ComponentType >
ComponentType * ToolBuilderUtil::FindFirstComponentOfType ( const FToolBuilderState InputState)

First first available component of given type. Searches Components selection list first, then all Actors

◆ IsVolume()

bool ToolBuilderUtil::IsVolume ( const UActorComponent Component)

Determine if component is a volume or not.