This issue has been closed as 'Won't Fix' due to an extended period of time without updates. If this issue is important to you please let us know by posting on the AnswerHub or UDN, and Epic will re-open the ticket for further review.
If a project that is set to Mobile/Tablet and Scalable 3D or 2D uses StartCameraFade() to produce a fade in effect, the effect will not play in PIE if the editor is closed/reopened.
1. Create new First Person code project
2. Set target to "Mobile/Tablet" and Graphical level to "Scalable 3D or 2D"
3. Create a new class based on GameMode (MyGameMode)
4. In MyGameMode.h add the following:
void BeginPlay() override;
5. In MyGameMode.cpp add the following:
void AMyGameMode::BeginPlay() { Super::BeginPlay(); APlayerController* pc = GEngine->GetFirstLocalPlayerController(GWorld); if (!pc) { GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("NO PLAYER CONTROLLER!")); } APlayerCameraManager* cameraMan = pc->PlayerCameraManager; if (!cameraMan) { GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("NO CAMERA MANAGER")); } float fromAlpha = 1.0; float toAlpha = 0.0; float duration = 2.0; FLinearColor color = FLinearColor::Black; bool bShouldFadeAudio = true; bool bHoldWhenFinished = true; cameraMan->StartCameraFade(fromAlpha, toAlpha, duration, color, bShouldFadeAudio, bHoldWhenFinished); GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("STARTED CAMERA FADE IN!")); }
6. Compile the code
7. In the world settings inside the editor, set GameMode Override to MyGameMode
8. PIE - the screen will briefly be black and fade in
9. Save and close the editor
10. Reopen the editor and PIE
Result:
The fade in effect won't play after restarting the editor
Expected:
Fade in plays when targeting for mobile as well as "Maximum Quality"
i have this problem UE4CC-Windows-58DC12AF4B97F057BD108FBFF569B2E9_0000
Delay nodes occasionally don't fire the "Completed" output in a nativized build
I am not able to find world outliner how to enable it?
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
An error occurred while trying to generate project files !?
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Platform - Mobile |
---|---|
Affects Versions | 4.9.2 |
Created | Oct 6, 2015 |
---|---|
Resolved | Jul 1, 2017 |
Updated | Sep 16, 2019 |