Class UsesSetHighlightMethods
Namespace: Unity.Labs.EditorXR.Interfaces
Syntax
public static class UsesSetHighlightMethods
Methods
SetBlinkingHighlight(IUsesSetHighlight, GameObject, Boolean, Transform, Material, Boolean, Single, Single)
Method for highlighting objects
Declaration
public static IEnumerator SetBlinkingHighlight(this IUsesSetHighlight user, GameObject go, bool active, Transform rayOrigin = null, Material material = null, bool force = false, float dutyPercent = 0.75F, float cycleDuration = 0.8F)
Parameters
Type | Name | Description |
---|---|---|
IUsesSetHighlight | user | The functionality user |
GameObject | go | The object to highlight |
Boolean | active | Whether to add or remove the highlight |
Transform | rayOrigin | RayOrigin that hovered over the object (optional) |
Material | material | Custom material to use for this object |
Boolean | force | Force the setting or unsetting of the highlight |
Single | dutyPercent | The percentage of time when the highlight is active |
Single | cycleDuration | The duration for which to show this highlight. Keep default value of 0 to show until explicitly hidden |
Returns
Type | Description |
---|---|
IEnumerator |
SetHighlight(IUsesSetHighlight, GameObject, Boolean, Transform, Material, Boolean, Single)
Method for highlighting objects
Declaration
public static void SetHighlight(this IUsesSetHighlight user, GameObject go, bool active, Transform rayOrigin = null, Material material = null, bool force = false, float duration = 0F)
Parameters
Type | Name | Description |
---|---|---|
IUsesSetHighlight | user | The functionality user |
GameObject | go | The object to highlight |
Boolean | active | Whether to add or remove the highlight |
Transform | rayOrigin | RayOrigin that hovered over the object (optional) |
Material | material | Custom material to use for this object |
Boolean | force | Force the setting or unsetting of the highlight |
Single | duration | The duration for which to show this highlight. Keep default value of 0 to show until explicitly hidden |