/// <summary> /// Setup for the Portal /// </summary> private new void OnEnable() { base.OnEnable(); NearTeleportables = new HashSet <Teleportable>(); PassthroughColliders = new Dictionary <Collider, Collider>(); //Add the buffer colliders to the collection BufferWall = new List <Collider>(); foreach (Transform tran in BufferWallObj.transform) { var c = tran.GetComponent <Collider>(); BufferWall.Add(c); c.enabled = false; } BufferWall.Add(FloorSegment); PhysicsPassthrough.Initialize(this); }
/// <summary> /// Setup for the Portal /// </summary> private void OnEnable() { NearTeleportables = new List <Teleportable>(); PassthroughColliders = new Dictionary <Collider, Collider>(); SetupCamera(); //Add the buffer colliders to the collection BufferWall = new List <Collider>(); foreach (Transform tran in BufferWallObj.transform) { Collider c = tran.GetComponent <Collider>(); BufferWall.Add(c); c.enabled = false; } PhysicsPassthrough.Initialize(this); //Set up things to keep the seamless recursion fix updated SeamlessRecursionRenderer.sharedMaterial = PortalMaterial; _seamlessRecursionBlock = new MaterialPropertyBlock(); StartCoroutine(KeepSeamlessFixUpdated()); }