Loadscene question

Hi. I have a question, i want to make a Loadscene, that has multiple loading area. Let’s say i enter this area.
then i want to enter another area, but if i exit that area i return to the main door. i am not behind the door i just entered. I don’t know if that makes and sense to you.

let me know if you understand the question. I do not use Java, i prefer C#.

Funnily enough, I answered a similar question in another thread: (SOLVED) Scene change manager?

In a nutshell: Keep track of the door ID (or even just door name), stick it in player prefs or something, and use that to determine where to place the player in the new scene.

1 Like

ok but let’s say i enter the room @ (12, 0, 5) but when i get out. return to (0, 0, 0) will the command help me return to (12, 0, 5) when i get out of that particular room?

I am making an house, where there is multiple zones. Like Bathroom(level), Living room(Level), Closet(level), etc… so i need multiple Zone spawn for the character.

Will all those zones be loaded at same time?

using UnityEngine;

namespace Assets.Code.Test {
//Use this on your player
    public class MovePlayerToSpawnPoint : MonoBehaviour {
        private void OnCollisionEnter(Collision other) {
            if (other.gameObject.CompareTag("Door")) {
                var SetPos = other.gameObject.GetComponent<SetPlayerPosition>();
                MovePlayer(SetPos); }
        }
        /// <summary>
        /// Get Player Position from door information
        /// </summary>
        /// <param name="door">A door component that holds a new position</param>
        private void MovePlayer(SetPlayerPosition door) {
            //Reset animation
            //Play cool sound
            //...
            gameObject.transform.position = door.transform.position;
        }
    }
//Use this on your door
    public class SetPlayerPosition : MonoBehaviour {
        public Transform newPosition;
    }
}

Your player may have a script that catch when that door was opened, and get directions

Ty i’ll look into it when i get home.

Hallways with five doors. or Level Zones. 6 door that zones into different part of the house. I am using an interact script, a door script which opens and a zoning script, i can make a small vid if you want. to show you.