A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
UFadingComponent Class Reference

Component responsible for fading meshes or actors smoothly. More...

#include <FadingComponent.h>

Inheritance diagram for UFadingComponent:
[legend]

Public Member Functions

 UFadingComponent ()
 
void FadeActor (AActor *Actor, float TimeForFade=1.0f, float DesiredOpacity=0.0f)
 Function that allows you to fade actor to smoothly make them invisible, ghost or visible (Actor should implement IPixoVRStoryObject interface)
 
void FadeStaticMeshes (TArray< UStaticMeshComponent * > StaticMeshes, float TimeForFade=1.0f, float DesiredOpacity=0.0f)
 Function that allows you to fade meshes to smoothly make them invisible, ghost or visible (Owner should implement IPixoVRStoryObject interface)
 
void FadeStaticMeshesFromTo (TArray< UStaticMeshComponent * > StaticMeshes, float TimeForFade=1.0f, float FromOpacity=0.0f, float ToOpacity=0.0f)
 Function that allows you to fade meshes to smoothly make them invisible, ghost or visible (Owner should implement IPixoVRStoryObject interface) It behaves in the same way as FadeStaticMeshes but allows for manual override of internal opacity state before fade.
 
virtual void TickComponent (float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
 

Public Attributes

FOnFadeCompleted OnFadeCompleted
 UPROPERTY(BlueprintAssignable)
 

Protected Member Functions

virtual void BeginPlay () override
 

Private Member Functions

void Fade ()
 
void FadeCompleted ()
 UFUNCTION()
 
void FadeOpacityTimelineProcess (float Value)
 UFUNCTION()
 
 GENERATED_BODY ()
 
void SetMeshesHidden (bool Hidden)
 Sets meshes hidden if mesh is invisible to reduce the consumption of resources for rendering.
 
void SetOpacity (float Value)
 Set opacity for meshes in MaterialData.
 
void SetOpaqueMaterial ()
 Sets opaque material if mesh is visible to reduce the consumption of resources for rendering.
 

Private Attributes

UCurveFloat * ChangingFadeOpacityCurve
 UPROPERTY()
 
float CurrentOpacity = 1.0f
 
float FadeDuration = 1.0f
 
FTimeline FadeTimeline
 
EFadeType FadeType
 
float FinalOpacity = 0.0f
 
TArray< FTransparentMaterialDataMaterialData
 UPROPERTY()
 

Detailed Description

Component responsible for fading meshes or actors smoothly.

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

Definition at line 28 of file FadingComponent.h.

Constructor & Destructor Documentation

◆ UFadingComponent()

UFadingComponent::UFadingComponent ( )

Definition at line 6 of file FadingComponent.cpp.

Member Function Documentation

◆ BeginPlay()

void UFadingComponent::BeginPlay ( )
overrideprotectedvirtual

Definition at line 106 of file FadingComponent.cpp.

Here is the call graph for this function:

◆ Fade()

void UFadingComponent::Fade ( )
private

Definition at line 152 of file FadingComponent.cpp.

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

◆ FadeActor()

void UFadingComponent::FadeActor ( AActor * Actor,
float TimeForFade = 1.0f,
float DesiredOpacity = 0.0f )
BlueprintCallable

Function that allows you to fade actor to smoothly make them invisible, ghost or visible (Actor should implement IPixoVRStoryObject interface)

Parameters
ActorActor which you want to fade (don't forget to override GetActorTransparentMaterialData)
TimeForFadeTime how long will the fade last
DesiredOpacityOpacity of meshes after fade

UFUNCTION(BlueprintCallable)

Definition at line 88 of file FadingComponent.cpp.

Here is the call graph for this function:

◆ FadeCompleted()

void UFadingComponent::FadeCompleted ( )
private

UFUNCTION()

Definition at line 95 of file FadingComponent.cpp.

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

◆ FadeOpacityTimelineProcess()

void UFadingComponent::FadeOpacityTimelineProcess ( float Value)
private

UFUNCTION()

Definition at line 193 of file FadingComponent.cpp.

Here is the call graph for this function:

◆ FadeStaticMeshes()

void UFadingComponent::FadeStaticMeshes ( TArray< UStaticMeshComponent * > StaticMeshes,
float TimeForFade = 1.0f,
float DesiredOpacity = 0.0f )
BlueprintCallable

Function that allows you to fade meshes to smoothly make them invisible, ghost or visible (Owner should implement IPixoVRStoryObject interface)

Parameters
StaticMeshesMeshes which you want to fade (don't forget to override GetActorTransparentMaterialData in Owner)
TimeForFadeTime how long will the fade last
DesiredOpacityOpacity of meshes after fade

UFUNCTION(BlueprintCallable)

Definition at line 14 of file FadingComponent.cpp.

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

◆ FadeStaticMeshesFromTo()

void UFadingComponent::FadeStaticMeshesFromTo ( TArray< UStaticMeshComponent * > StaticMeshes,
float TimeForFade = 1.0f,
float FromOpacity = 0.0f,
float ToOpacity = 0.0f )
BlueprintCallable

Function that allows you to fade meshes to smoothly make them invisible, ghost or visible (Owner should implement IPixoVRStoryObject interface) It behaves in the same way as FadeStaticMeshes but allows for manual override of internal opacity state before fade.

Parameters
StaticMeshesMeshes which you want to fade (don't forget to override GetActorTransparentMaterialData in Owner)
TimeForFadeTime how long will the fade last
FromOpacityOpacity of meshes before fade
ToOpacityOpacity of meshes after fade

UFUNCTION(BlueprintCallable)

Definition at line 82 of file FadingComponent.cpp.

Here is the call graph for this function:

◆ GENERATED_BODY()

UFadingComponent::GENERATED_BODY ( )
private

◆ SetMeshesHidden()

void UFadingComponent::SetMeshesHidden ( bool Hidden)
private

Sets meshes hidden if mesh is invisible to reduce the consumption of resources for rendering.

Definition at line 137 of file FadingComponent.cpp.

Here is the caller graph for this function:

◆ SetOpacity()

void UFadingComponent::SetOpacity ( float Value)
private

Set opacity for meshes in MaterialData.

Definition at line 184 of file FadingComponent.cpp.

Here is the caller graph for this function:

◆ SetOpaqueMaterial()

void UFadingComponent::SetOpaqueMaterial ( )
private

Sets opaque material if mesh is visible to reduce the consumption of resources for rendering.

Definition at line 126 of file FadingComponent.cpp.

Here is the caller graph for this function:

◆ TickComponent()

void UFadingComponent::TickComponent ( float DeltaTime,
ELevelTick TickType,
FActorComponentTickFunction * ThisTickFunction )
overridevirtual

Definition at line 145 of file FadingComponent.cpp.

Member Data Documentation

◆ ChangingFadeOpacityCurve

UCurveFloat* UFadingComponent::ChangingFadeOpacityCurve
private

UPROPERTY()

Definition at line 113 of file FadingComponent.h.

◆ CurrentOpacity

float UFadingComponent::CurrentOpacity = 1.0f
private

Definition at line 106 of file FadingComponent.h.

◆ FadeDuration

float UFadingComponent::FadeDuration = 1.0f
private

Definition at line 105 of file FadingComponent.h.

◆ FadeTimeline

FTimeline UFadingComponent::FadeTimeline
private

Definition at line 109 of file FadingComponent.h.

◆ FadeType

EFadeType UFadingComponent::FadeType
private

Definition at line 104 of file FadingComponent.h.

◆ FinalOpacity

float UFadingComponent::FinalOpacity = 0.0f
private

Definition at line 107 of file FadingComponent.h.

◆ MaterialData

TArray<FTransparentMaterialData> UFadingComponent::MaterialData
private

UPROPERTY()

Definition at line 102 of file FadingComponent.h.

◆ OnFadeCompleted

FOnFadeCompleted UFadingComponent::OnFadeCompleted
BlueprintAssignable

UPROPERTY(BlueprintAssignable)

Definition at line 79 of file FadingComponent.h.


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