Editar

Partilhar via


DockPosition Class

Definition

Represents a position where a Dockable object can be docked. This component also adds a Collider and a Rigidbody, if they're not already present.

public ref class DockPosition : UnityEngine::MonoBehaviour
[UnityEngine.AddComponentMenu("Scripts/MRTK/Experimental/Dock/DockPosition")]
[UnityEngine.RequireComponent(typeof(UnityEngine.Collider), typeof(UnityEngine.Rigidbody))]
public class DockPosition : UnityEngine.MonoBehaviour
[<UnityEngine.AddComponentMenu("Scripts/MRTK/Experimental/Dock/DockPosition")>]
[<UnityEngine.RequireComponent(typeof(UnityEngine.Collider), typeof(UnityEngine.Rigidbody))>]
type DockPosition = class
    inherit MonoBehaviour
Public Class DockPosition
Inherits MonoBehaviour
Inheritance
UnityEngine.MonoBehaviour
DockPosition
Attributes
UnityEngine.AddComponentMenuAttribute UnityEngine.RequireComponentAttribute

Constructors

DockPosition()

Properties

DockedObject

The object that is currently docked in this position (can be null).

IsOccupied

True if this position is occupied, false otherwise.

Methods

Awake()

Ensure this object has a triggering collider, and ensure that this object doesn't block manipulations.

Start()

If an object was set to be docked to this at start up, ensure it's docked.

Applies to

See also