Referencing a gameobject in another scene

The solutions I found online do not suit my requirements so I decided to ask a question here.

Situation:

  • I have a player with the property dontdestroyonload() attached to him and is currently inside Scene A
  • I load a new scene, Scene B by interacting with a portal (just a random game object with a boxcollider to detect if player is within the portal range) lets call it portalA
  • Player does not get destroyed and is loaded into the new scene
  • Scene B has another portal object called portalB which I intend to have the player spawn at but when using scenemanager loadscene() function to load the scene, since player object does not destroy on load, his transform position will be where he left off in Scene A and obviously not at portalB which I will need to reference to get the coordinates for the transform position.

Assuming I intend to do multiple portals and getting the transform once I load the scene will be tedious using a method I am aware of (tags).
Is there a way to get portalB which is inside scene B while I am still inside scene A before I step through portalA?

You can’t access anything from a scene that hasn’t already been loaded. You can have multiple scenes loaded at once though, so you can load in Scene B, reference the portal, then unload Scene A when the player steps through