So I've decided to split my game into separate scenes(main menu, gameover, etc.) And I'm trying to use an if statement in my code to check if the current scene is "gameover" so I can perform some action. I know Unity now uses SceneManager instead of Application, but what's the equivalent of this function
if(Application.loadedLevelName == "gameover")
I've tried SceneManager.GetActiveScene == "gameover"
But I just get errors like can't use == here.
I have imported SceneManager aswell