Cross Scene gameobject reference
Hi,
I have a project with multiple maps in different scenes. I'm trying to make a MonoBehaviour which will teleport the player to another scene at a specific position (a game object). Currently I created a GameObjectReference class with a scene property (SceneAsset) and a objectName property (string). When I teleport i load the scene if needed and get the referenced object using GameObject.Find method. But I'm not really statisfied with this solution since it meens that if I rename the spawn point object, I have to update all the teleporters in different scenes.
Does somebody have a better solution to reference objects from other scenes ?
Your answer
Follow this Question
Related Questions
Hi. I'm trying to make an extremely simple game. 0 Answers
Making achtung die kurve 0 Answers
Instantiate changes position 1 Answer
Help making a UMA move 0 Answers
Create a Menu in Unity 5 0 Answers