After updating an older project to Unity 2019.3.6, switching to URP and updating AC to 1.71.4, the crossfading of scenes no longer seems to work.
My setup: player taps hotspot in scene XXX --> hotspot interaction (use): scene: switch YYY ("Overlay current screen during switch" checked) --> switch to scene YYY happens --> scene YYY has Cutscene OnStart / OnLoad set to run in background; this cutscene includes one action only:
Before updating the project, I had the crossfades working, even though I had the issue described in this thread because I am using linear color space too.
Additional notes:
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
More notes:
This is a type - it should be recommending a Camera: Fade Action, like this tutorial.
I'll attempt a recreation - thanks for the details.
I have no issue with crossfading itself, when using the fade Action on the other side.
However, I did recreate the "too bright" issue when using Linear color space.
Open up MainCamera.cs, and replace the TakeOverlayScreenshot function (line 638) with the following:
Does that resolve it?
I am afraid I cannot tell, because in my case the "too bright" issue has been replaced by the "does not crossfade" issue after doing the upgrades I described. I cannot afford to revert everything back to Unity 2018 and AC 1.69.X right now, I am afraid.
I did make the change to MainCamera.cs though – but it didn't resolve the crossfading issue. There still is first a cut to black and then a fade in from black to the new scene.
So what now …
Should we try to take a step back and find an answer first to the following (maybe underlying) issue:
Very simple setup:
Result: when running in editor, there still is that short cut to black in between the scenes, during which the game window shows nothing – no menus, no AC status box, no statistics box! Nothing.
Do you have any idea what might cause this?
Alright, I just tried to make a minimum build of scenes XXX and YYY in order to find out if this issue is editor-related and/or occurs on the iOS build, too – but when I tried, I got grilled by unity for the inclusion of this new code into MainCamera.cs:
;-)
I wasn't suggesting you revert back to anything - the code should be for the latest release. Though, if you're getting that build error just remove the line:
And it should compile.
AC will place a black texture over things while a scene initialises to mask objects being moved / animations being set up, etc. It should rely on the previous scene's "overlay" texture, though. You can prevent this, however, by unchecking Black out when initialising? in the Settings Manager's "Scene loading" section.
That was something I had under suspicion too, but it is and has been unchecked during all the last attempts. So this cannot be the source, either.
Let's see what happens in the build … I report back, when it is compiled.
And I didn't mean to sound rude – sorry if my remark came across that way. I just wanted to point out that I cannot recreate the "too light" issue any longer, as crossfading does not work for me anymore at all right now.
And as you cannot recreate this behavior on your end, I am a little nervous right now, because currently I have no idea where else to look …
Unfortunately, the behavior is on the build, too:
It may well be unique to your project - or at least your combination of AC and pipeline settings.
Are you able to create a cut-down, duplicate project that demonstrates the issue with two scenes? If so, zip it up, PM it to me along with instructions on how to trigger it, and I'll take a look.
Sent!
Thank you, Chris.