LoadScene without unloading the last.
I am trying to make it so that my character can go into a room. The room is a new scene. I am currently using Application.LoadLevel( ); to move to the next room, but when I go back to the last room, I want the character to be right outside the door instead of starting back at the spawn-point. I have one main overworld, with all the other small rooms.
Would LoadLevelAdditive be a good way to load the next level, without unloading the last so that the character will stay outside the door? I don't want the character to move while I am still in a level because I want the character to stay right outside the door. There is another character in the next scene so I only want to move that character while the first is waiting outside the door.
In a previous game, I made a copy of the main world for every door. Each one had the character outside each one of the doors. I know that there is a better way but I can't figure one out.
In simple terms, I want it to stand outside the door that it just came from when I go back to the overworld and not start the scene over at the beginning spawn point.
What would be the best way to do this?
Thanks
Answer by ddsinteractive · May 10, 2016 at 08:48 PM
Can you save the translation/transform into a global variable before leaving the room and entering the next scene/room?
Do you mean create an empty object that the character can teleport to when it enters the scene?
It could be an empty GO if you desire. I was thinking more of scripting which would adjust the character's transform and translate to where it left, albeit 180 degrees so they're now facing away from whence they came. (through the door so to speak)
If I use an empty game object, would I use something like gameObject.transform.translate(PublicGameObject.transform)
I tried that but it doesn't recognize it. How would I do it?
Here is an example using a similar line of thought:
Your answer
![](https://koobas.hobune.stream/wayback/20220612080536im_/https://answers.unity.com/themes/thub/images/avi.jpg)