Different builds have completely different results…
The major problems: For Version:
- A build is 1.3GB while almost no content is visible in a minimal level
- Editor->DevelopmentBuild == Incorrect fullscreen + incorrect active view camera
- Editor->ShippingBuild == incorrect active view camera
- VS->DevelopmentBuild == Fatal error on startup (tried copying files from binary folder to WindowsNoEditor, no luck)
- VS->ShippingBuild == Fatal error on startup (tried copying files from binary folder to WindowsNoEditor, no luck)
The wrong active camera on a build may have to do with that I have NO default pawn in my GameMode. This works fine in the editor, I have set ‘bFindCameraComponentWhenViewTarget=true’ set on some actor that contains a camera component. But in a build this fails miserably apparently…?
When running these builds, no log is created or the log does not contain ‘errors’. The output and game-logic is wrong but not recognized as such…
For Version 4.7.0 p6/p7
I did try to do a Standalone run from Editor (No build) but this results in a freeze lockup see other thread.
I cannot continue as there seems no path or workaround anymore to fix my issues.
Output is either a Fatal crash, a Render lockup or no error occurs but the output is wrong and no ‘issues’ are
presented in the log output…
I have the wrong Active camera fixed when a build is made.
- Have multiple SceneCapture2D’s.
- Have a ‘normal’ Camera. Create custom C++ class of this camera and set in in constructor: ‘bFindCameraComponentWhenViewTarget = true’
- Call this every tick or in BeginPlay from within the custom C++ camera class: GetWorld()->GetFirstPlayerController()->SetViewTarget(this);
- Test game in editor to see if targetview is set correct.
- Create custom game mode and make sure default pawn is set to None
- Make a shipping or development build of the game
- Startup with shortcut with command arguments: -winx aaa -winy bbbb
-fullscreen and see that the viewtarget is wrong and will not get fixed, even when SetViewTarget is called every tick.
The fix is to not start with shortcut but set correct rendering options in DefaultGameUserSettings.ini. This way, the viewtarget is correctly maintained.
There are a few questions I have to help me investigate the behavior you’re seeing.
How are you setting up the multiple SceneCapture2D?
Are you creating a custom C++ class based on CameraActor or based on a specific camera?
Do you see the same behavior if the default pawn is not set to None?
When creating the shipping/development build are you doing so through VS or are you creating a packaged version of the game through the editor?
If you could elaborate on the steps to reproduce what you’re seeing it will help in determining exactly what is happening and what the cause is.
I’m still unclear on how to follow your setup. I created the new C++ class based on actor and created a BP based on this class. What do you mean by “have a ‘normal’ Camera”? Are you referring to adding a camera component to the same blueprint? Are you creating a C++ class based on CameraActor or CameraComponent? Please list out the steps you take when recreating this error in a new project.
I managed to reproduce the bug.
- Create project with minimal content.
- Create blueprint based on GameMode
- Set the new GameMode in worldSettings and set DefaultPawn to None
- Remove player start location
- Add a SceneCapturer2D
- Create new C++ class based on AActor
- Add constructor to C++ with the const FObjectInitializer& …
- Add lines in constructor: bFindCameraComponentWhenViewTarget = true;
PrimaryActorTick.bCanEverTick = true;
AutoReceiveInput = EAutoReceiveInput::Player0;
- Add function Tick(float dt), in that function add:
- Compile in VS and start editor from VS.
- Create blueprint based on this new actor.
- Add camera component in the just created blueprint.
- Press play and see you see the correct output of the just added Camera.
- Make a development (packaged) build.
- Create shortcut of executable (On windows: WindowsNoEditor) add in arguments: -winx 1920 -winy 1080 -fullscreen
- Play and if done ‘correct’ you will see not correct output i guess from center of world.
I don know if the SceneCapturer2D, the custom GameMode and all other steps are required to reproduce. I think it has primarily to do with the -fullscreen tag. Removing that shows correct output.
I was able to follow your steps however when I opened the shortcut for the game the screen was black (both with and without -fullscreen in the properties). Is this what you were referring by not seeing the correct output?
I think it depends on what you have at the center of the world. If it is a blank black floor, then your output might be black. I have seen the problem coming and going with and without -fullscreen. That is, in one of my projects it only happens when -fullscreen added, in the other it occurs also without.
I’ve entered a bug report to our internal tracking database (UE-10164) for further investigation of the difference between PIE and packaged versions of the camera behavior. Thank you for your help in identifying and reproducing this issue.