Namespace Microsoft.MixedReality.Toolkit.UI
Classes
AppBar
Logic for the App Bar. Generates buttons, manages states.
AppBarButton
Button class used by AppBar.
BaseStateModel
Base class for defining state model logic to use in conjunction with the State class Allows for retrieving current state mode and comparing states
Billboard
The Billboard class implements the behaviors needed to keep a GameObject oriented towards the user.
BoundingBox
BoundingBox allows to transform objects (rotate and scale) and draws a cube around the object to visualize the possibility of user triggered transform manipulation. BoundingBox provides scale and rotation handles that can be used for far and near interaction manipulation of the object. It further provides a proximity effect for scale and rotation handles that alters scaling and material.
BoundingBoxHelper
The BoundingBoxHelper class contains functions for getting geometric info from the non-axis-aligned bounding box of a GameObject. These functions can be used to align another object to the center of a certain face or the center of an edge of a face... etc. The BoundingBoxHelper static function can be used for a one time calculation. The dynamic functions can be used to obtain boundingcube info on an object's Update loop. Operations are minimized in the dynamic use scenario.
ButtonBackgroundSize
The base layout component for a button or UI elements - easily build UI with Unity Primitives. Helps to create consistency by using values that scale to a designer's 2D layout program. Based on a ratio of 2048 pixels for 1 meter of surface area.
Use case: A designer creates a concept image of UI based on a 2048 artboard. 2048 pixels is a nice resolution for a meter of content, two meters away from the user. The FOV of the HoloLens is about 1 meter wide at 2 meters from the user meaning the designer can assume an image area of 2048 x 1184 pixels at 2 meters from the user. The designer or engineer can take pixel based redlines and create UI at 1:1 scale.
ButtonBackgroundSizeOffset
Scales an object relative the scale of the Anchor Transform Works best when using with Layout3DPixelSize, but not required - See LayoutPixelSize for more info Use Case: Create a button, then add another element who's size should maintain a consistent size relative to the Anchor. Like creating a button background using a Cube and ButtonSize. The add another Cube that is 40 pixels smaller than the background. Event if the background changes size, this element will remain 40 pixels smaller.
ButtonBorder
Use a Unity primitive cube or cylinder as a border segment relative to the scale of the AnchorTransform Use with ButtonSize on the component and the Anchor for consistent results Works best when using with ButtonSize, but not required - See ButtonSize for more info.
ButtonCollider
Scales the collider on one object relative to the transform's scale of another object
ButtonConfigHelper
Helper component that gathers the most commonly modified button elements in one place.
ButtonIconSet
An asset for storing textures, sprites and character icons for use with MRTK buttons. Used by ButtonConfigHelper script.
ButtonLayout
Place an object in space relative to another object's scale Good for responsive buttons that can stretch and object realign
ButtonSize
ButtonSizeOffset
Scales an object relative the scale of the AnchorTransform
ColorChangerUnityUI
Change the color of the material on a UnityUI Graphic (ex. Image). Useful for visualizing button presses.
ConstraintManager
Manages constraints for a given object and ensures that Scale/Rotation/Translation constraints are executed separately.
CursorContextManipulationHandler
This script provides cursor context for the manipulation handler
CursorContextObjectManipulator
This script provides cursor context for the object manipulator. It will show an icon next to the cursor indicating the available action that can be performed. Currently this component only supports context for moving an object.
CustomInteractablesReceiver
Example of building a custom receiver that can be loaded as part of the events on the Interactable or in InteractableReceiverList or InteractableReceiver
Extend ReceiverBaseMonoBehavior to build external event components
DestroyOnAnimationComplete
Destroys the Game Object after the length of the Animator component. Attach this script to any game object with Animator component to destroy on animation complete.
Dialog
DialogButton
Handling click event and dismiss dialog
DialogResult
DialogShell
This class implements the abstract class Dialog. DialogShell class manages a dialog object that can have one or two option buttons. If you try to open a dialog with more than two option buttons, it will show the first two.
FaceUserConstraint
Component for fixing the rotation of a manipulated object such that it always faces or faces away from the user
FixedDistanceConstraint
Component for setting the min/max scale values for ObjectManipulator or BoundsControl
FixedRotationToUserConstraint
Component for fixing the rotation of a manipulated object relative to the user
FixedRotationToWorldConstraint
Component for fixing the rotation of a manipulated object relative to the world
FollowMeToggle
A utility script for toggling the 'Follow Me' behavior by activating/deactivating the Radial View Solver. This script also provides optional toggle at specified distance.
GazeHandHelper
This class must be instantiated by a script that implements the IMixedRealitySourceStateHandler, IMixedRealityInputHandler and IMixedRealityInputHandler<T>.
It must receive EventData arguments from OnInputDown(), OnInputUp(), OnInputChanged() and OnSourceLost().
This class manages the states of input necessary to calculate a proper grab position The eventData received on inputdown has the point on the target that was hit by the gaze; the mixedrealitypose - eventdata received on input changed contains the handposition in eventdata.inputdata.position It also contains useful retrieval functions.
HandInteractionPanZoom
HandInteractionPanZoom.HandPanData
Internal data stored for each hand or pointer.
HandPanEventData
Information associated with a particular hand pan event.
InputRecordingControls
Utility class to make input recording service accessible through game objects. Hook up buttons to the public functions to start and stop recording input.
Interactable
Uses input and action data to declare a set of states Maintains a collection of themes that react to state changes and provide sensory feedback Passes state information and input data on to receivers that detect patterns and does stuff.
InteractableActivateTheme
Theme engine that allows control to enable/disable a GameObject based on the current state
InteractableAnimatorTheme
ThemeEngine that controls Animator state based on state changes Targets first Animator component returned on initialized GameObject
InteractableAudioReceiver
Add audio clip to play onClick or on Voice Command
InteractableAudioTheme
Theme Engine to play particular audio files based on state changes. Add AudioSource component if none is found on initialized GameObject or in children
InteractableColorChildrenTheme
Theme engine to control the color for all Renderer children under the initialized GameObject based on state changes
InteractableColorTheme
Theme Engine that can set colors on a Renderer or text object based on state changes This Theme will try to set color on first available text object in order of TextMesh, Text, TextMeshPro, and TextMeshProUGUI object If no text-based component can be found, then will fall back to first Renderer component found on the initialized GameObject and target the color shader property provided in the ThemeDefinition.
InteractableEvent
Event base class for events attached to Interactables.
InteractableEventInspector
InteractableGrabScaleTheme
ThemeEngine to control initialized GameObject's scale based on associated Interactable grab state and related state changes
InteractableHighlight
Adds or removes materials to target renderer for highlighting Focused GameObjects.
InteractableMaterialTheme
Theme Engine to control the material used based on state changes Changes the material for the first Renderer component on the initialized GameObject
InteractableOffsetTheme
InteractableOnClickReceiver
A basic receiver for detecting clicks
InteractableOnFocus
Adds or removes materials to target renderer for highlighting Focused GameObjects.
InteractableOnFocusReceiver
A basic focus event receiver
InteractableOnGrabReceiver
A basic grab event receiver for detecting grab events (OnGrab, OnRelease) or grab state changes from Interactable When the grab states change, on or off, these events are triggered
InteractableOnHoldReceiver
Basic hold event receiver
InteractableOnPressReceiver
Basic press event receiver
InteractableOnToggleReceiver
An event receiver that listens to toggle events
InteractableOnTouchReceiver
A basic touch event receiver for detecting Physical Touch state changes in the Interactable When the physical touch states change, these events are triggered.
InteractablePointerSimulator
A way to test button state feedback while in the editor
InteractableProfileItem
The foundation of profiles that exist on an Interactable Profiles pair ThemeContainers with the objects they manipulate, based on state changes
InteractableReceiver
Example of building an event system for Interactable that still uses ReceiverBase events
InteractableReceiverInspector
InteractableReceiverList
An example of building an Interactable receiver that uses built-in receivers that extend ReceiverBase
InteractableReceiverListInspector
InteractableRotationTheme
Theme Engine to control a GameObject's rotation based on state changes
InteractableScaleTheme
Theme Engine to control initialized GameObject's scale based on state changes
InteractableShaderTheme
Theme Engine to control the value of a particular Shader Property based on state changes Targets the first Renderer component on the initialized GameObject and use MaterialPropertyBlocks
InteractableStates
list of Interactable states and basic comparison
InteractableStringTheme
Theme Engine to change the string value on a Text type object based on state changes Finds the first available component searching in order of TextMesh, Text, TextMeshPro, TextMeshProUGUI
InteractableTextureTheme
Theme Engine to change the texture on a GameObject based on state changes
InteractableThemeBase
Base abstract class for all Theme Engines. Extend to create custom Theme logic
InteractableThemeShaderUtils
Collection of shader and material utilities
InteractableToggleCollection
A way to control a list of radial type buttons or tabs
LoaderController
Controls how the standard indeterminate loader moves and behaves over time.
MaintainApparentSizeConstraint
Component for setting the min/max scale values for ObjectManipulator or BoundsControl
ManipulationEvent
A UnityEvent callback containing a ManipulationEventData payload.
ManipulationEventData
Information associated with a particular manipulation event.
ManipulationHandler
This script allows for an object to be movable, scalable, and rotatable with one or two hands. You may also configure the script on only enable certain manipulations. The script works with both HoloLens' gesture input and immersive headset's motion controller input.
MinMaxScaleConstraint
Component for setting the min/max scale values for ObjectManipulator or BoundsControl
MoveAxisConstraint
Component for limiting the translation axes for ObjectManipulator or BoundsControl
ObjectManipulator
This script allows for an object to be movable, scalable, and rotatable with one or two hands. You may also configure the script on only enable certain manipulations. The script works with both HoloLens' gesture input and immersive headset's motion controller input.
PanUnityEvent
Unity event for a pan / zoom event. Contains the hand pan event data
PinchSlider
A slider that can be moved by grabbing / pinching a slider thumb
PointerBehaviorControls
Utility class to control PointerBehavior of pointers. Hook up buttons to the public functions to turn rays on and off.
PrefabSpawner
Add to any Object to spawn a prefab to it, according to preference
PressableButton
A button that can be pushed via direct touch. You can use PhysicalPressEventRouter to route these events to Interactable.
PressableButtonHoloLens2
HoloLens 2 shell's style button specific elements
ProgressIndicatorLoadingBar
Displays progress bar and (optionally) percentage text.
ProgressIndicatorObjectDisplay
This class manages how a GameObject rotates and/or scales when activated as part of a Progress Indicator effect.
ProgressIndicatorOrbsRotator
This class manages the 'rotating circle of dots' effect that is used as a Progress Indicator effect.
ReceiverBase
The base class for all receivers that attach to Interactables
ReceiverBaseMonoBehavior
A base class for detecting hand handling state changes from an Interactable Extend this class to build new events or receivers from Interactables
InteractableReceiver or InteractableReceiverList can be used with ReceiverBase - built-in receivers
RotationAxisConstraint
Component for limiting the rotation axes for ObjectManipulator or BoundsControl
ScaleOffsetColorTheme
Theme Engine to control initialized GameObject's scale, local position offset, and color based on state changes For color, will try to set on first available text object in order of TextMesh, Text, TextMeshPro, and TextMeshProUGUI If none found, then Theme will target first Renderer component available and target the associated shader property found in ThemeDefinition
ScrollingObjectCollection
ScrollingObjectCollection.ScrollEvent
The UnityEvent type the ScrollingObjectCollection sends. GameObject is the object the fired the scroll.
ScrollingObjectCollectionNode
A ObjectCollectionNode specific for ScrollingObjectCollection.
SliderEvent
A UnityEvent callback containing a SliderEventData payload.
SliderEventData
SliderSounds
Component that plays sounds to communicate the state of a pinch slider
SpeechConfirmationTooltip
Tooltip used for speech confirmation label. This inherits ToolTip class and provides generic text string interface for the label. To create your own speech confirmation label, override SpeechConfirmationTooltip and provide SetText(string s) and TriggerConfirmationAnimation() functions. Assign the prefab to the SpeechInputHandler.cs
State
State data model, state management and comparison instructions
States
States scriptableObject for storing available states and related state model
Theme
Theme scriptableObject for loading theme settings
ThemeEaseSettings
Ease settings and functionality for themes
ThemeProperty
A simple property with name, tooltip, value and type, used for serialization The custom settings are used in themes to expose properties needed to enhance theme functionality
ThemePropertyValue
Base values of a theme property, used for serialization
ThemeStateProperty
Class to store information about a Theme property that contains values per available state
ToggleHandVisualisation
ToolTip
Class for Tooltip object Creates a floating tooltip that is attached to an object and moves to stay in view as object rotates with respect to the view.
ToolTipBackgroundBlob
A background with 'fake' inertia Useful for soft or liquid objects
ToolTipBackgroundCorners
Renders meshes at the corners of a tool tip
ToolTipBackgroundMesh
Renders a background mesh for a tool tip using a mesh renderer If the mesh has an offset anchor point you will get odd results
ToolTipConnector
Connects a ToolTip to a target Maintains that connection even if the target moves
ToolTipLineHighlight
Renders an outline around tooltip background
ToolTipSpawner
Add to any Object to spawn ToolTips on tap or on focus, according to preference Applies its follow settings to the spawned ToolTip's ToolTipConnector component
ToolTipUtility
Static class providing useful functions for finding ToolTip Attach point information.
TouchEvent
A UnityEvent callback containing a TouchEventData payload.
TransformConstraint
Base class for all constraints
UIMaterialInstantiator
This is required since UnityUI Graphic elements do not support MaterialPropertyBlocks, and any shader operations can end up modifying the material permanently across all shared instances. To prevent that we create a runtime copy of the material.
VisualProfile
Profile container for theme and for loading theme settings
Structs
ButtonIconSet.CharIcon
InteractableColorChildrenTheme.BlocksAndRenderer
ShaderProperties
Obsolete container. Only exists to support backward compatibility to copy values from old scriptableobjects
ThemeDefinition
Defines configuration properties and settings to use when initializing a class extending InteractableThemeBase
Interfaces
IInteractableHandler
IProgressIndicator
IToolTipBackground
IToolTipHighlight
Enums
AppBar.AppBarDisplayTypeEnum
AppBar.AppBarStateEnum
AppBar.ButtonTypeEnum
BoundingBox.BoundingBoxActivationType
This enum defines how the BoundingBox gets activated
BoundingBox.BoundsCalculationMethod
This enum defines what volume type the bound calculation depends on and its priority for it.
BoundingBox.FlattenModeType
Enum which describes how an object's BoundingBox is to be flattened.
BoundingBox.HandleType
Enum which describes whether a BoundingBox handle which has been grabbed, is a Rotation Handle (sphere) or a Scale Handle( cube)
BoundingBox.RotationHandlePrefabCollider
This enum defines the type of collider in use when a rotation handle prefab is provided.
BoundingBox.WireframeType
This enum describes which primitive type the wireframe portion of the BoundingBox consists of.
ButtonIconStyle
Render style for MRTK buttons.
ConnectorFollowType
How does the Tooltip track with its parent object
ConnectorOrientType
How does the Tooltip rotate about the connector
ConnectorPivotDirection
In which direction does the tooltip connector project.
ConnectorPivotMode
Controls how the tooltip will pivot relative to the camera/other objects.
DialogButtonType
The style (caption) of button on a Dialog.
DialogState
Describes the current state of a Dialog.
DisplayMode
Enum describing the display mode of a ToolTip.
InteractableHighlight.HighlightedMaterialStyle
InteractableOnPressReceiver.InteractionType
Type of valid interaction distances to fire press events
InteractableStates.InteractableStateEnum
List of valid state types for Interactable
ManipulationHandler.HandMovementType
ManipulationHandler.ReleaseBehaviorType
ManipulationHandler.RotateInOneHandType
ManipulationHandler.TwoHandedManipulation
ObjectManipulator.ReleaseBehaviorType
ObjectManipulator.RotateInOneHandType
Describes what pivot the manipulated object will rotate about when you rotate your hand. This is not a description of any limits or additional rotation logic. If no other factors (such as constraints) are involved, rotating your hand by an amount should rotate the object by the same amount. For example a possible future value here is RotateAboutUserDefinedPoint where the user could specify a pivot that the object is to rotate around. An example of a value that should not be found here is MaintainRotationToUser as this restricts rotation of the object when we rotate the hand.
PrefabSpawner.RemainType
PressableButton.SpaceMode
Enum for defining space of plane distances.
ProgressIndicatorState
ReceiverBaseMonoBehavior.SearchScopes
Types of directions to search for Interactable component in transform hierarchy
ScrollingObjectCollection.EditMode
Edit modes for defining scroll viewable area and scroll interaction boundaries.
ScrollingObjectCollection.PaginationMode
Scroll pagination modes.
ScrollingObjectCollection.ScrollDirectionType
The direction in which a ScrollingObjectCollection can scroll.
ScrollingObjectCollection.VelocityType
How velocity is applied to a ScrollingObjectCollection when a scroll is released.
SelectionModes
Values for user-friendly dimensions settings
ShaderPropertyType
SliderAxis
Describes in which axis to orient the slider
ThemeEaseSettings.BasicEaseCurves
ThemePropertyTypes
Theme property value types used for converting theme values back and forth from serialized objects
ToolTipAttachPoint
Used to find a pivot point that is closest to the anchor. This ensures a natural-looking attachment where the connector line meets the label.