Forum begins after the advertisement:
-
::Greetings to you. Such a problem: when moving to a new level, the dark screen does not disappear, and another error in the console periodically pops up. If necessary, I can drop the scripts. https://imgur.com/a/9Knwtor
::What you should do is remove any other instances of your singletons in other scenes: Player, Canvas, GameManager. From the looks of it, you have a duplicate canvas in your “Cave_2”. Perhaps that could be the reason behind your black screen?
::Thanks, everything has been fixed, but there is another small problem: after moving to a new scene, the character flashes all the time as if he is taking damage, how can this be fixed?
::This is because of a new line i added on SceneTransition.cs to stop the player from taking damage while in scene transition, it turns on the playerstate invincible when triggered.
To stop this, go to your playercontroller.cs FlashWhileinvincible method and add the parameter !cutscene
to the if statement to stop flashing if the player is in cutscene state.
I’ll have to re edit the scripts in the series to add this in since I didn’t realize it then.
::Update: I’ve recently updated the Article and the bug forum post about the transition invincibility issue, and should now have a working code.
Metroidvania Part 5 Article
Part 5 Bugfixing Forum post
::Thanks, everything is working correctly now.
Advertisement below: