Why not remove the player from ALL your scenes, put him in his own separate scene, then load scenes additively?
That way you don’t even need a Player prefab at all, just have a Player scene and load him additively.
I tend to break up all my games into partial scenes, all additively loaded by the game manager:
- UI
- player
- enemy manager
- other stuff?
and then finally I load the content scene.
The first batch of screens all have scripts that do nothing until the content scene appears and they know where to spawn the player. In the case of the player he actually turns off his visual components in Awake() and waits for the spawnpoint to appear that is in the content level. I usually just use a MonoBehavior that has nothing else in it for GameObject markers like that, something like “PlayerSpawnLocation”.
This also lets you drop a tiny manager script into the content scene so when you’re working on it solo and fire it up, if there is no player scene present it will load it automagically for you.
The only tricky thing about additive scenes is that they do not load until the next frame. I usually have the game manager yield one frame, then load the content to avoid trouble.
I often have other transient scenes that load additively for things like:
- pause UI
- inventory UI
- other?
Once you start using additive scenes you’ll kinda wonder how you made it this far without it. It’s SO much simpler.