DialogPool.Get(DialogPool+Policy, GameObject) Method
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.
Retrieves or creates a new dialog instance. Specify a spawnPolicy to
determine how existing dialogs are handled. By default, the spawner will use its DialogPrefab,
but a custom prefab can also be specified. Dialogs of different types
will be pooled independently. Only one dialog can be visible at a time, globally.
public MixedReality.Toolkit.UX.IDialog Get(MixedReality.Toolkit.UX.DialogPool.Policy spawnPolicy = MixedReality.Toolkit.UX.DialogPool+Policy.DismissExisting, UnityEngine.GameObject prefab = default);
member this.Get : MixedReality.Toolkit.UX.DialogPool.Policy * UnityEngine.GameObject -> MixedReality.Toolkit.UX.IDialog
Public Function Get (Optional spawnPolicy As DialogPool.Policy = MixedReality.Toolkit.UX.DialogPool+Policy.DismissExisting, Optional prefab As GameObject = Nothing) As IDialog
Parameters
- spawnPolicy
- DialogPool.Policy
How the spawner should deal with existing dialogs (dismiss or abort)
- prefab
- UnityEngine.GameObject
The prefab to use for the dialog. If null, the spawner's DialogPrefab will be used.
Returns
A dialog instance, or null if the spawner was unable to spawn a dialog.
Remarks
To build your dialog, call the fluent builder methods on the IDialog instance retuirned by this method.