30 UE_LOG(LogTemp, Error, TEXT(
"UFadingComponent::FadeStaticMeshes: FinalOpacity equals CurrentOpacity"));
34 if (StaticMeshes.Num() == 0)
36 UE_LOG(LogTemp, Error, TEXT(
"UFadingComponent::FadeStaticMeshes: TargetMeshes array is empty"));
42 for (UStaticMeshComponent* Mesh : StaticMeshes)
44 if (!Mesh->IsValidLowLevelFast())
46 UE_LOG(LogTemp, Error, TEXT(
"UFadingComponent::FadeStaticMeshes: Mesh isn't valid"));
49 AActor* Owner = Mesh->GetOwner();
52 TArray<FTransparentMaterialData> MaterialDataTemp = IPixoVRStoryObject::Execute_GetActorTransparentMaterialData(Owner);
54 if (MaterialDataTemp.Num() != 0)
58 return MeshDataIt.
MeshRef == Mesh;
64 UE_LOG(LogTemp, Error, TEXT(
"UFadingComponent::FadeStaticMeshes: There is no MaterialData for %s mesh"), *Mesh->GetName());
68 UE_LOG(LogTemp, Error, TEXT(
"UFadingComponent::FadeStaticMeshes: Actor has no transparent data!"));
69 GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red,
"UFadingComponent::FadeStaticMeshes: Actor has no transparent data!");
74 UE_LOG(LogTemp, Error, TEXT(
"UFadingComponent::FadeStaticMeshes: Actor doesn't implement interface!"));
75 GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red,
"UFadingComponent::FadeStaticMeshes: Actor doesn't implement 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 shou...
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 shou...
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 shoul...