Connect multiple scenes to one main scene

So I’m making a 2d RPG (not to sell because I’m still pretty new with coding and just trying to learn) and my plan is to have multiple scenes (which will act as NPC houses) and allow the player to explore each house.

But my problem comes from trying to return to the main scene, the world_scene. I want the player too, when exiting one of the house scenes, to appear outside that house in the main world_scene. But he just pops back to whatever position he was in when I created the main world_scene. I know this is because I’m unloading the world_scene, than reloading the same way it was when I first created it.

Throwing a DontDestroyOnLoad on my player leads to the player spawning at (0, 0, 0) in whatever scene he switches to.

So my question is, how can create a way for my player to travel to any NPC house (which will load a new scene) and have him then reload the main_world scene at the same position he was at when he first loaded the new scene.

_
Been stuck on this for a while, any help will be much appreciated!

Try storing player’s position using PlayerPrefs just before you exit the World scene. Now, when your player come back to World scene from other scene, read and set player’s position using PlayerPrefs.

Just make sure you also have an If statement running if there is no value stored in PlayerPrefs, which will put player into the initial position of World scene.

I don’t know how you’re triggering the scene change, if you can provide some code than I can help you with hard coding this.