HoverLight is a Fluent Design System paradigm that mimics a point light hovering near the surface of an object. Often used for far away interactions, the application can control the properties of a Hover Light via the
For a material to be influenced by a
HoverLight the Mixed Reality Toolkit/Standard shader must be used and the Hover Light property must be enabled.
The MRTK/Standard shader supports up to two
HoverLights by default, but will scale to support four and then ten as more lights are added to the scene.
Most scenes within the MRTK utilize a
HoverLight. The most common use case can be found on the MRTK/SDK/Features/UX/Prefabs/Cursors/DefaultCursor.prefab
The HoverLightExamples scene also demonstrates usage of
HoverLight behaviors, and can be found at: MRTK/Examples/Demos/StandardShader/Scenes/
How to increase the number of available
from ten to twelve.
// 1) Within MRTK/Core/StandardAssets/Shaders/MixedRealityStandard.shader change: #if defined(_HOVER_LIGHT_HIGH) #define HOVER_LIGHT_COUNT 10 // to: #if defined(_HOVER_LIGHT_HIGH) #define HOVER_LIGHT_COUNT 12 // 2) Within MRTK/Core/Utilities/StandardShader/HoverLight.cs change: private const int hoverLightCountHigh = 10; // to: private const int hoverLightCountHigh = 12;
If Unity logs a warning similar to below then you must restart Unity before your changes will take effect.
Property (_HoverLightData) exceeds previous array size (24 vs 20). Cap to previous >size.