Linking objects inherited from other levels via DontDestroyOnLoad()

TL;DR: I want to use the inspector in the editor to link objects from “scene 1” to objects in “scene 0” - where the objects in “scene 0” are inherited via the DontDestroyOnLoad() mechanic.

“level 0” is my start scene (main menu, options, etc.) and “level 1” is my first actual gameplay level.

At runtime, I want to create my “GameManager” object in my “level 0” scene, keep it alive with DontDestroyOnLoad(), then load my “level 1” scene from a button click.

At edit time, I want to load the “level 1” scene into the editor and just edit and play it from the editor normally. As part of that editing, I’d like to “link” objects in the “level 1” scene to my GameManager object using inspector references.

The problem is, my “GameManager” doesn’t exist as part of “level 1” in the editor - I’m expecting that the GameManager object will have already been created when “level 0” was loaded as part of starting the game. I really like linking associations between objects by dragging them around into the editor - that is, scripts in my “level 1” scene would have a GameManager type public variable that I link in the editor by just dragging my GameManager object onto it (or selecting in the object browser).

One approach could be that I have a “fake” GameManager object in “scene 1”, that is only enabled when I’m in the editor. This could then be configured however I want when I run in the editor - but when the game is really running, the fake GameManager from “scene 1” is just disabled and the real GameManager is inherited from “level 0” (thanks to the DontDestroyOnLoad() call that happened earlier). Somehow, when the game is running for real, I need to “replace” all the the fake GameManager instance references in “scene 1” with the reference to the one inherited from “scene 0”.

All this will work, but I can’t figure out how to deal with object links.

I’m aware of singletons and static variables and their uses. I’d just prefer to use the editor to associate my game objects (especially for NGUI and animation events, etc.) - I just can’t figure out how to make it work with the DontDestroyOnLoad() functionality.

Can anyone point me in the right direction for how I might achieve this?

Hmm. That’s an interesting problem I hadn’t thought about. All I can think of is making the manager a prefab and actually instantiating it in each scene, and then keeping scene information that isn’t destroyed for the game manager in a static class. Anything else kind of sounds too complicated. It’s too bad there isn’t an editor option with don’t destroy on load that automatically puts it in the next scene.