ObjectBar 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.
Dynamic collection of objects positioned in a horizontal or vertical stack with an auto sized back plate.
[UnityEngine.AddComponentMenu("MRTK/UX/Object Bar")]
[UnityEngine.ExecuteAlways]
public class ObjectBar : UnityEngine.MonoBehaviour
[<UnityEngine.AddComponentMenu("MRTK/UX/Object Bar")>]
[<UnityEngine.ExecuteAlways>]
type ObjectBar = class
inherit MonoBehaviour
Public Class ObjectBar
Inherits MonoBehaviour
- Inheritance
-
UnityEngine.MonoBehaviourObjectBar
- Attributes
-
UnityEngine.AddComponentMenuAttribute UnityEngine.ExecuteAlwaysAttribute
Constructors
| Name | Description |
|---|---|
| ObjectBar() | |
Properties
| Name | Description |
|---|---|
| BackPlateObject |
The game object that represents the back plate for this object bar. This transform will be modified according to the properties on this component. For example, if the objects in the Object Bar Object's list increases, the scale of this back plate will increase. |
| BackPlateZOffset |
The Z axis offset for the Back Pate Object. |
| BorderSpacing |
The space between the object bar objects and the edge of the back plate. |
| ObjectBarFlowDirection |
The flow direction of the object bar objects. |
| ObjectBarObjects |
List of game objects contained in the Object Bar. Each game object must contain a collider as the bounds are used for position calculations. |
| OnObjectBarUpdated |
Invoked when any property is modified or the size of the Object Bar Objects list has been changed. |
| SpacingBetween |
The space between each individual object bar object along the x axis for a ObjectBarFlowDirection.Horizontial and along the y axis for ObjectBarFlowDirection.Vertical. |
Methods
| Name | Description |
|---|---|
| OnDestroy() |
A Unity event function that is called when the script component has been destroyed. |
| Start() |
A Unity event function that is called on the frame when a script is enabled just before any of the update methods are called the first time. |
| Update() |
A Unity event function that is called every frame, if this object is enabled. |
| UpdateObjectBar() |
Update the position of the objects in the object bar and update the size and position of the back plate object. |