-
Notifications
You must be signed in to change notification settings - Fork 110
Interactable Object
You can find the samples in the scene InteractableObject_Examples.unity under https://github.com/Microsoft/MRDesignLabs_Unity/tree/master/DesignLabs_Unity_Examples/Assets/MRDL_ControlsExample/Scenes
These are the examples using primitives and imported 3D meshes as Interactable Objects. You can easily assign different scale, offset and colors to respond to different input interaction states.
This is an example of Holographic button used in the Start menu and . This example uses Unity's Animation Controller and Animation Clips.
Toolbar is a widely used pattern in mixed reality experiences. It is a simple collection of buttons with additional behavior such as Billboarding and tag-a-long. This example uses a Billboarding and tag-a-long script from HoloToolkit. You can control the detailed behavior including distance, moving speed and threshold values.
This example shows a traditional 2D style button with some dimension. Each input state has a slightly different depth and animation properties.
With HoloLens, you can leverage physical space. Imagine a holographic push button on the physical wall. Or how about a coffee cup on the real table? Using 3D models imported from modeling software, we can create Interactable Object that resembles real life object. Since it is digital object, we can add magical interactions to it.
In default, this Unity project does NOT contain required HoloLens symbol font file. You need to download from Microsoft's desgin resources page.(https://docs.microsoft.com/en-us/windows/uwp/design-downloads/index) Without font file, you will see placeholder icons on the buttons. After importing the font file, find DefaultButtonIconProfileFont and click Auto-assign HoloLens MDL2 Symbols font
In the scene InteractableObject_Examples.unity, you will be able to find various combinations of 'CompoundButton' scripts. To create your own Interactable Object, you can combine different types of 'CompountButton' scripts. You can find them in MRDesignLab\HUX\Scripts\Buttons. It is designed to support various types of Interactable Object in flexible way.
This is the base of the button component. You will need this script to build any types of Interactable Objects.Use this script to use various types of custom mesh. You can use your own 3D models imported from 3D modeling software. Using this scripts, you can easily change the scale, offset of the mesh or material properties such as color for the different input interaction states. To create an Interactable Object using script, it is recommended to create an empty GameObject as a container and put the 3D mesh model under it as child component. This will prevent unexpected behavior from different scaling or offset values.
Using this scripts, you can use various types of icon provided by Windows fonts. To use this feature, you should have your Windows updated to 'Creators Update'.
This scripts helps you manage a TextMesh component to display text on your button. This script can be used in conjunction with a CompoundButtonSpeech component to automatically link your button to spoken keywords.
Use this script to add audio feedback for the different input interaction states.
Use this script to automatically register keywords for your button in the Speech Manager (This script is experimental and still being tested).