How to make gameobject become active only when the previous scene is title scene


My question is pretty much in the title. I’d like to make it so that a GameObject only becomes active after the main menu is loaded from the title screen. Now it loads every time I load the main menu.

Thanks in advance!

There’s a lot of ways. You can try with a class with a static variable called previousScene. Before to change any scene just remember to change the variable value.

public class ControlClass
   public static string previousScene;
ControlClass.previousScene = Application.LoadedLevelName;

Another option is create a persistent singleton with this variable.