Can you execute a script before loading a scene and handle the scene loading by hand?
Is my memory game persistent or scene persistent? For example if I dynamically create a new instance of a class (that doesn’t inherit from GameObject) will it be still there when I load another scene?
The first scene in File->Build Settings is the scene that is loaded first.
You can have a scene that does not show anything to the player that does initialization. When it is done initializing it can load the next scene. Kinda like a initialization script/state.
If you store the instance in a static variable it will be available in other scenes. Look up Singleton pattern for more info.
The term “script” might be a bit vague for this conversation, what I meant was that Unity will not let you use the class in the same way as it would if it inherited from MonoBehaviour.
If you inherited from MonoBehaviour you would be able to attach it to a game object in the scene or a prefab.
What you have here is an instance that you will be able to keep between scenes without re-initializing for every scene as long as you store the reference in a static variable.