API reference
API reference
Select your platform
No SDKs available
No versions available

PlaneSurface Class

Extends MonoBehaviour, ISurface, IBounds
A representation of an infinite plane which can serve as a surface for interactions.
Rarely used on its own, but frequently used as an underlying component of ClippedPlaneSurfaces.
While it is uncommon for a PlaneSurface to be used on its own (because few interactable elements can be considered infinite planes), it is quite common for multiple different ClippedPlaneSurfaces to exist on the same plane: consider multiple buttons on a single interactable UI. In such a scenario, many ClippedPlaneSurfaces can be backed by the same PlaneSurface, ensuring that they always remain coplanar regardless of edits to the underlying surface.

Member Enumerations

Enumeration NormalFacing

Used for interaction with flat surfaces, and acts in much the same way as Unity’s Plane.
Backward
Normal faces along the transform's negative Z axis
Forward
Normal faces along the transform's positive Z axis

Properties

Gets or sets the direction (NormalFacing.Forward or NormalFacing.Backward) for this plane.
Determines whether this plane is double-sided.
If true, this plane can be interacted with from either side; otherwise, the plane is only considered to exist if perceived from the direction of its normal.
Returns either the forward direction or the backward direction depending on whether Facing is NormalFacing.Forward or NormalFacing.Backward, respectively.
Implementation of IBounds.Bounds; for details, please refer to the related documentation provided for that property.

Fields

Implementation of ISurface.Transform; for details, please refer to the related documentation provided for that property.

Member Functions

Implementation of ISurface.ClosestSurfacePoint(in Vector3, out SurfaceHit, float); for details, please refer to the related documentation provided for that property.
Implementation of ISurface.Raycast(in Ray, out SurfaceHit, float); for details, please refer to the related documentation provided for that property.
Gets a Unity Plane representation of the mathematical plane represented by this PlaneSurface.
Injects all required dependencies for a dynamically instantiated PlaneSurface; effectively wraps InjectNormalFacing(NormalFacing) and InjectDoubleSided(bool).
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets the NormalFacing value for a dynamically instantiated PlaneSurface.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets whether a dynamically instantiated PlaneSurface should be interactable from both sides.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon