Bewerken

Delen via


ConstraintManager Class

Definition

Manages constraints for a given object and ensures that Scale/Rotation/Translation constraints are executed separately.

public ref class ConstraintManager : UnityEngine::MonoBehaviour
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/constraint-manager")]
public class ConstraintManager : UnityEngine.MonoBehaviour
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/constraint-manager")>]
type ConstraintManager = class
    inherit MonoBehaviour
Public Class ConstraintManager
Inherits MonoBehaviour
Inheritance
UnityEngine.MonoBehaviour
ConstraintManager
Attributes
UnityEngine.HelpURLAttribute

Constructors

ConstraintManager()

Properties

AutoConstraintSelection

Per default, constraint manager will apply all to this gameobject attached constraint components automatically. If this flag is enabled, only the selected constraint list will be applied.

SelectedConstraints

Manually selected list of transform constraints. Note that this list will only be processed by the manager if AutoConstraintSelection is disabled. Note that this is a read only property. To add new constraints to the list call RegisterConstraint.

Methods

AddConstraintToManualSelection(TransformConstraint)

Adds a constraint to the manual selection list. Note that only unique components will be added to the list.

ApplyRotationConstraints(MixedRealityTransform, Boolean, Boolean)
ApplyScaleConstraints(MixedRealityTransform, Boolean, Boolean)
ApplyTranslationConstraints(MixedRealityTransform, Boolean, Boolean)
Awake()
Initialize(MixedRealityTransform)
RemoveConstraintFromManualSelection(TransformConstraint)

Removes the given component from the manually selected constraint list.

Applies to