Hi everyone!
I've just started using adventure creator for a side project. Now I've come across the first problem that I could use help with.
I have 2 scenes. In the first one I ask what gender the player character should be. I save the decision in a global variable and change to the next scene.
https://imgur.com/a/7pXwKF5
In the next scene, I want to read the global variable and display the corresponding sprite (For now male sprite or female sprite). This basically works, but for a brief moment you see both sprites.
Am I approaching the scene change incorrectly here? It will certainly happen more than once in the game that an NPC should be in a scene at one point and not at another, depending on something.
https://imgur.com/a/daOTagG
Approaches I have tried without success: Engine Wait, Camera Fade Out/In, teleport sprites to markers instead of change visibility, remove the entire GameObject.
Unity Version: 2022.3.47f1
AC Version: 1.81.7
I have a short video about the problem here:
Thanks for your help
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @SylvanKeep.
The Actions that hide/show the sprites all run instantly, so there shouldn't be any visible delay in the list itself.
How are you running these Actions? Through the "OnStart" cutscene assigned in the Scene Manager? I can't reproduce such an issue on my end.
Can you share a screenshot of your Settings Manager's "Scene loading" panel, and is there any difference if you check Overlay current scene during switch? in your Scene: Switch Action?
A couple of notes, separate to the issue itself:
Thank you for the welcome and the quick answer.
I created a cutscene within the hierarchy in both scenes and entered it in the Scene Manager under "Scene cutscenes" -> "On start".
In scene 1, the cutscene immediately opens a menu. There are two buttons that save the variable, close the menu and finally switch to scene 2.
Scene loading panel: https://imgur.com/a/aIfcxiT
I have already tried to load the scene synchronously or asynchronously.
Overlay current scene during switch? doesn't seem to make a difference.
Thanks for the tips. I changed the variable to a popup variable, which is very useful.
I think the player switch is too much, since you only see your own character in the first scene, the prologue.
Thanks for the details.
It sounds like you've set everything up correctly, but I can't reproduce this issue.
Would you be able to make a .unitypackage of your game's subfolder and PM it to me? I'll take a look at it on my end.
This occurs because your OnStart cutscene has a non-zero start delay, causing it to run once the scene has begun. Set this to zero to fix the issue.
That way it works now, thank you very much.
I don't remember changing anything, but when I create a new cutscene the start delay is at 0 by default. So it was my fault.