PortalSelector Class

Summary

PortalSelector is a class for the user to interface with portal linking in a simple way. It provides a button that follows the portal wherever it's placed. Clicking the button will link the portal to the next registered portal, even if that portal is the same as the source.
Namespace
ASL.PortalSystem
Base Types
  • MonoBehaviour
graph TD Base0["MonoBehaviour"]-->Type Type["PortalSelector"] class Type type-node

Syntax

public class PortalSelector : MonoBehaviour

Fields

Name Constant Value Summary
button
Button on PortalSelector prefab. Make sure this is set in the scene.
playerCam
Camera used for determining clicks, via raycasting, hitting the selector button.

Methods

Name Value Summary
Initialize(Camera, Portal) void
Initialize the PortalSelector with a camera for raycasting button clicks, and a source Portal to follow and control.