ObjectBarAddRemoveItems 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.
Adds and removes objects from a given Object Bar to demonstrate the back plate auto adjust behavior.
[UnityEngine.AddComponentMenu("MRTK/UX/Object Bar Add\Remove Items")]
public class ObjectBarAddRemoveItems : UnityEngine.MonoBehaviour
[<UnityEngine.AddComponentMenu("MRTK/UX/Object Bar Add\Remove Items")>]
type ObjectBarAddRemoveItems = class
inherit MonoBehaviour
Public Class ObjectBarAddRemoveItems
Inherits MonoBehaviour
- Inheritance
-
UnityEngine.MonoBehaviourObjectBarAddRemoveItems
- Attributes
-
UnityEngine.AddComponentMenuAttribute
Constructors
| Name | Description |
|---|---|
| ObjectBarAddRemoveItems() | |
Properties
| Name | Description |
|---|---|
| ObjectBar |
The target Object Bar. |
| PrefabToInstantiate |
The prefab to instantiate and add to the ObjectBar.ObjectBarObjects list. |
| TargetParent |
Target parent transform of the instantiated prefab. |
Methods
| Name | Description |
|---|---|
| AddToObjectBarList() |
Instantiate a specified prefab and add it to the ObjectBarObjects list with the Target parent as the parent transform. |
| RemoveLastFromObjectBarList() |
Remove the last item from the ObjectBarObjects list. |