ConstraintManager Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Manages constraints for a given object and ensures that scale, rotation, and translation constraints are executed separately.
[UnityEngine.AddComponentMenu("MRTK/Spatial Manipulation/Constraint Manager")]
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/constraint-manager")]
public class ConstraintManager : UnityEngine.MonoBehaviour
[<UnityEngine.AddComponentMenu("MRTK/Spatial Manipulation/Constraint Manager")>]
[<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.MonoBehaviourConstraintManager
- Attributes
-
UnityEngine.AddComponentMenuAttribute UnityEngine.HelpURLAttribute
Remarks
The constraint system might be reworked in the future. In such a case, these existing components will be deprecated.
Constructors
| Name | Description |
|---|---|
| ConstraintManager() | |
Properties
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
| 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) |
Apply rotation constraints to the given transform. |
| ApplyScaleConstraints(MixedRealityTransform, Boolean, Boolean) |
Apply scale constraints to the given transform. |
| ApplyTranslationConstraints(MixedRealityTransform, Boolean, Boolean) |
Apply move or translation constraints to the given transform. |
| Awake() |
A Unity event function that is called when an enabled script instance is being loaded. |
| Initialize(MixedRealityTransform) |
Obsolete.
This function is obsolete. |
| OnManipulationStarted(MixedRealityTransform) |
Call when manipulation begins. |
| RemoveConstraintFromManualSelection(TransformConstraint) |
Removes the given component from the manually selected constraint list. |
| Setup(MixedRealityTransform) |
Call once before any manipulation occurs. |