using System; using UnityEngine; namespace Escape_Room_Engine.Portal { public class Portal : MonoBehaviour { /// /// The portal that is connected with this one. /// public Portal other; /// /// The camera that will draw the view for this portal. /// public PortalCamera portalCamera; private void Awake() { // check whether the other portal is set up if (!other || other.other != this) throw new Exception("Other portal not set up correctly."); } } }