Bearbeiten

Freigeben über


Dialog Class

Definition

public ref class Dialog abstract : UnityEngine::MonoBehaviour
public abstract class Dialog : UnityEngine.MonoBehaviour
type Dialog = class
    inherit MonoBehaviour
Public MustInherit Class Dialog
Inherits MonoBehaviour
Inheritance
UnityEngine.MonoBehaviour
Dialog
Derived

Constructors

Dialog()

Fields

OnClosed

Called after user has clicked a button and the dialog has finished closing

result

Properties

Result

Can be used to monitor result instead of events

State

The current state of the Dialog.

Methods

CloseDialog()

Closes the dialog - state must be set to Closed afterwards

DismissDialog()

Function to destroy the Dialog.

FinalizeLayout()

This is called after the buttons are generated and the title and message have been set. Perform here any operations that you'd like Lays out the buttons on the dialog E.g. using an ObjectCollection

GenerateButtons()

Generates buttons - Must parent them under buttonParent!

Launch(DialogResult)
Open(GameObject, DialogButtonType, String, String, Boolean, Object)

Instantiates a dialog and passes a generated result

Open(GameObject, DialogResult)

Instantiates a dialog and passes it a result

OpenDialog()

Opens the dialog - state must be set to WaitingForInput afterwards Overridden in inherited class. Perform any change here that you'd like to have when the dialog opened.

RunDialogOverTime()

Opens dialog, waits for input, then closes

SetTitleAndMessage()

Set the title and message using the result E.g. using TextMesh components

UpdateDialog()

Perform any updates (animation, tagalong, etc) here This will be called every frame while waiting for input

Applies to