Documentation for the Unreal C++ Plugin
Loading...
Searching...
No Matches
UHighlightComponent Class ReferenceBlueprintable

Component responsible for managing object highlighting. More...

#include <HighlightComponent.h>

Inheritance diagram for UHighlightComponent:
[legend]

Public Member Functions

 UHighlightComponent ()
 
void ActivatePulseHighlight (bool Activate)
 Activates or deactivates the pulse highlight effect.
 
void ManuallyActivatePulseHighlight (bool Activate, TArray< UMeshComponent * > TargetComponent)
 Manually activates or deactivates the pulse highlight effect on specific part of the object.
 
void ManuallyActivatePulseHighlightOnSpecificMaterials (bool Activate, TArray< UMeshComponent * > TargetComponent, TArray< int > TargetMaterialIndexes)
 Manually activates or deactivates the pulse highlight effect on specific part of the object and specific material index.
 
void UpdateHighlightValue (EHighlightColor HighlightColor)
 Updates the highlight color of the object.
 

Public Attributes

bool ActivateHighlightOnEachStep = false
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
bool AlwaysEmissiveHighlight = false
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
EHighlightColor CurrentHighlight = EHighlightColor::None
 UPROPERTY()
 
TArray< UStaticMeshComponent * > DeactivatedMeshes
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
bool DeactivateHighlightOnEachInactiveStep = true
 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Highlight")
 
TArray< FText > HighlightActiveOnSteps
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
bool IsShowHighlight = true
 UPROPERTY()
 
FOnHighlightChanged OnHighlightChanged
 UPROPERTY(BlueprintAssignable)
 
FOnHighlightValueChanged OnHighlightValueChanged
 UPROPERTY(BlueprintAssignable)
 
FTimerHandle PulseHighlightTimerHandle
 UPROPERTY(BlueprintReadWrite)
 
bool UseIsObjectActiveInsteadOfActiveSteps = false
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 

Protected Member Functions

virtual void BeginPlay () override
 

Private Member Functions

void ChangeHighlightMaterialColor (const TFunctionRef< FVector()> Color, TArray< TWeakObjectPtr< UMeshComponent > > TargetMeshes)
 
void ChangeHighlightSpecificMaterialColor (const TFunctionRef< FVector()> Color, TArray< TWeakObjectPtr< UMeshComponent > > TargetMeshes, TArray< int > MaterialIndexes)
 
 GENERATED_BODY ()
 
void PerformPulseHighlight ()
 UFUNCTION()
 
void UpdatedOwnerMeshComponents ()
 

Private Attributes

TArray< int > AffectedMaterialIndexes
 
bool BlockPulsing = false
 
TMap< EHighlightColor, FLinearColor > ColorMap
 
float HighlightTime = 0.0f
 
TArray< TWeakObjectPtr< UMeshComponent > > OwnerMeshComponents
 
float PulseDirection = 0.0f
 

Detailed Description

Component responsible for managing object highlighting.

UCLASS(Blueprintable, ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )

Definition at line 34 of file HighlightComponent.h.

Constructor & Destructor Documentation

◆ UHighlightComponent()

UHighlightComponent::UHighlightComponent ( )

Definition at line 7 of file HighlightComponent.cpp.

Member Function Documentation

◆ ActivatePulseHighlight()

void UHighlightComponent::ActivatePulseHighlight ( bool Activate)
BlueprintCallable

Activates or deactivates the pulse highlight effect.

Parameters
ActivateIndicates whether to activate or deactivate the pulse highlight effect.

UFUNCTION(BlueprintCallable)

Definition at line 43 of file HighlightComponent.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BeginPlay()

void UHighlightComponent::BeginPlay ( )
overrideprotectedvirtual

Definition at line 23 of file HighlightComponent.cpp.

◆ ChangeHighlightMaterialColor()

void UHighlightComponent::ChangeHighlightMaterialColor ( const TFunctionRef< FVector()> Color,
TArray< TWeakObjectPtr< UMeshComponent > > TargetMeshes )
private

Definition at line 137 of file HighlightComponent.cpp.

Here is the caller graph for this function:

◆ ChangeHighlightSpecificMaterialColor()

void UHighlightComponent::ChangeHighlightSpecificMaterialColor ( const TFunctionRef< FVector()> Color,
TArray< TWeakObjectPtr< UMeshComponent > > TargetMeshes,
TArray< int > MaterialIndexes )
private

Definition at line 170 of file HighlightComponent.cpp.

Here is the caller graph for this function:

◆ GENERATED_BODY()

UHighlightComponent::GENERATED_BODY ( )
private

◆ ManuallyActivatePulseHighlight()

void UHighlightComponent::ManuallyActivatePulseHighlight ( bool Activate,
TArray< UMeshComponent * > TargetComponent )
BlueprintCallable

Manually activates or deactivates the pulse highlight effect on specific part of the object.

Parameters
ActivateIndicates whether to activate or deactivate the pulse highlight effect.
TargetComponentIndicates array of the meshes which would have impact pulse highlight

UFUNCTION(BlueprintCallable, Category = "Highlight Functionality")

Definition at line 67 of file HighlightComponent.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ManuallyActivatePulseHighlightOnSpecificMaterials()

void UHighlightComponent::ManuallyActivatePulseHighlightOnSpecificMaterials ( bool Activate,
TArray< UMeshComponent * > TargetComponent,
TArray< int > TargetMaterialIndexes )
BlueprintCallable

Manually activates or deactivates the pulse highlight effect on specific part of the object and specific material index.

Parameters
ActivateIndicates whether to activate or deactivate the pulse highlight effect.
TargetComponentIndicates array of the meshes which would have impact pulse highlight
TargetMaterialIndexesIndicates array of material indexes which would have impact pulse highlight

UFUNCTION(BlueprintCallable, Category = "Highlight Functionality")

Definition at line 95 of file HighlightComponent.cpp.

Here is the call graph for this function:

◆ PerformPulseHighlight()

void UHighlightComponent::PerformPulseHighlight ( )
private

UFUNCTION()

Definition at line 106 of file HighlightComponent.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdatedOwnerMeshComponents()

void UHighlightComponent::UpdatedOwnerMeshComponents ( )
private

Definition at line 210 of file HighlightComponent.cpp.

Here is the caller graph for this function:

◆ UpdateHighlightValue()

void UHighlightComponent::UpdateHighlightValue ( EHighlightColor HighlightColor)
BlueprintCallable

Updates the highlight color of the object.

Parameters
HighlightColorThe color to set as the highlight.

UFUNCTION(BlueprintCallable)

Definition at line 28 of file HighlightComponent.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ActivateHighlightOnEachStep

bool UHighlightComponent::ActivateHighlightOnEachStep = false
BlueprintReadWriteEditAnywhere

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

Indicates whether to activate the highlight on each step.

Definition at line 138 of file HighlightComponent.h.

◆ AffectedMaterialIndexes

TArray<int> UHighlightComponent::AffectedMaterialIndexes
private

Definition at line 163 of file HighlightComponent.h.

◆ AlwaysEmissiveHighlight

bool UHighlightComponent::AlwaysEmissiveHighlight = false
BlueprintReadWriteEditAnywhere

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

Forces emissive highlight so highlight is the same on pc and mobile

Definition at line 105 of file HighlightComponent.h.

◆ BlockPulsing

bool UHighlightComponent::BlockPulsing = false
private

Definition at line 168 of file HighlightComponent.h.

◆ ColorMap

TMap<EHighlightColor, FLinearColor> UHighlightComponent::ColorMap
private

Definition at line 165 of file HighlightComponent.h.

◆ CurrentHighlight

EHighlightColor UHighlightComponent::CurrentHighlight = EHighlightColor::None

UPROPERTY()

The current highlight color of the object.

Definition at line 89 of file HighlightComponent.h.

◆ DeactivatedMeshes

TArray<UStaticMeshComponent*> UHighlightComponent::DeactivatedMeshes
BlueprintReadWriteEditAnywhere

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

The mesh on which the highlight shouldn't be active.

Definition at line 152 of file HighlightComponent.h.

◆ DeactivateHighlightOnEachInactiveStep

bool UHighlightComponent::DeactivateHighlightOnEachInactiveStep = true
EditDefaultsOnlyBlueprintReadWrite

UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Highlight")

Indicates whether to inactivate the highlight on each deactivation. Should be false in the case of manual pulse highlight activation

Definition at line 145 of file HighlightComponent.h.

◆ HighlightActiveOnSteps

TArray<FText> UHighlightComponent::HighlightActiveOnSteps
BlueprintReadWriteEditAnywhere

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

The steps on which the highlight should be active.

Definition at line 131 of file HighlightComponent.h.

◆ HighlightTime

float UHighlightComponent::HighlightTime = 0.0f
private

Definition at line 166 of file HighlightComponent.h.

◆ IsShowHighlight

bool UHighlightComponent::IsShowHighlight = true

UPROPERTY()

Indicates whether the highlight should be shown.

Definition at line 93 of file HighlightComponent.h.

◆ OnHighlightChanged

FOnHighlightChanged UHighlightComponent::OnHighlightChanged
BlueprintAssignable

UPROPERTY(BlueprintAssignable)

Definition at line 117 of file HighlightComponent.h.

◆ OnHighlightValueChanged

FOnHighlightValueChanged UHighlightComponent::OnHighlightValueChanged
BlueprintAssignable

UPROPERTY(BlueprintAssignable)

Definition at line 111 of file HighlightComponent.h.

◆ OwnerMeshComponents

TArray<TWeakObjectPtr<UMeshComponent> > UHighlightComponent::OwnerMeshComponents
private

Definition at line 169 of file HighlightComponent.h.

◆ PulseDirection

float UHighlightComponent::PulseDirection = 0.0f
private

Definition at line 167 of file HighlightComponent.h.

◆ PulseHighlightTimerHandle

FTimerHandle UHighlightComponent::PulseHighlightTimerHandle
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite)

The timer handle for the pulse highlight effect.

Definition at line 98 of file HighlightComponent.h.

◆ UseIsObjectActiveInsteadOfActiveSteps

bool UHighlightComponent::UseIsObjectActiveInsteadOfActiveSteps = false
BlueprintReadWriteEditAnywhere

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

Indicates whether to use IsObjectActive instead of ActiveSteps for highlight activation.

Definition at line 124 of file HighlightComponent.h.


The documentation for this class was generated from the following files: