Well firstly, you dont need to “Work with” DontDestroyOnLoad(), literally just put
And the object the script is on will no longer be destroyed on scene change.
Now as for the Multiple entrances, any newly loaded in object will be calling the Start() and Awake() function (any object that wasnt loaded in the previous scene). You can use this to your advantage. The way I would do it is to have a static boolean value on the player or another object that exists across scene change (Using the DontDestoryOnLoad() function) called “loadIn” that is set to false. Then, when you interact with the door in SceneA, it should set the loadIn value to true, then change the scene.
Some object in SceneB should then have the Awake() function checking if loadin == true, (i.e has the player come from a door and needs to be teleported somewhere before loading in). If it finds it is true, it needs to teleport the player.
Now as the player isn’t going to be in SceneB, you’ll have to use code to find the player gameobject eg:
private GameObject player;
// Find the Player by Tagging it in the Inspector
// Find by it's name in the scene Object List
After you have the players gameObject, you simply need to tp it to the door in question if loadIn is true. There are a few ways to do this, but how I would do it is to create a doorID on each door in a scene. then give the players script a static int called “goToID”. then, when the scene loads in, have every door check first if if the player should load in to a door, and then test if the players goToID, is the same as that doors ID in the scene. Eg:
public int DoorID;
public GameObject player;
private void Awake()
player = GameObject.FindGameObjectWithTag("Player");
if (PlayerController.loadIn == true) // "PlayerController" is the nameof the players script.
if (PlayerController.goToID == DoorID)
player.transform = this.transform;
//Teleport the player to this object
After that, simply tag the player with “Player” in the editor, then make sure that the part of the Door script that takes the player to the next scene has a line to set both loadIn and and DoorID on the player. Hope this helps, but feel free to ask if you need anything clarified