Search Results for

    Show / Hide Table of Contents

    Class DialogueUI

    Simple UI script that uses NonPlayerCharacter callbacks.

    Inheritance
    Object
    DialogueUI
    Namespace: NPCEngine.Components
    Assembly: cs.temp.dll.dll
    Syntax
    public class DialogueUI : MonoBehaviour

    Fields

    dialogueHistory

    Text field for the dialogue.

    Declaration
    protected Text dialogueHistory
    Field Value
    Type Description
    Text

    dialogueTopics

    Text field for the topics of the possible dialogue options.

    Declaration
    protected Text dialogueTopics
    Field Value
    Type Description
    Text

    highlightColor

    Declaration
    public Color highlightColor
    Field Value
    Type Description
    Color

    lineLimit

    Line limit for the text field.

    Declaration
    public int lineLimit
    Field Value
    Type Description
    Int32

    uiObject

    Gameobject that will be enabled, disabled and oriented towards the player.

    Declaration
    public GameObject uiObject
    Field Value
    Type Description
    GameObject

    usernameColor

    Declaration
    public Color usernameColor
    Field Value
    Type Description
    Color

    Methods

    AddLine(ChatLine, Boolean)

    Adds the given text to the dialogue history. Used with the OnDialogueLine callback.

    Declaration
    public void AddLine(ChatLine chatLine, bool highlight = false)
    Parameters
    Type Name Description
    ChatLine chatLine
    Boolean highlight

    Disable()

    Disable Dialogue UI.

    Declaration
    public void Disable()

    Enable()

    Enable Dialogue UI.

    Declaration
    public void Enable()

    UpdateTopics(List<String>)

    Updates the dialogue topics. Used with NonPlayerCharacter.OnTopicHintsUpdate.

    Declaration
    public void UpdateTopics(List<string> topics)
    Parameters
    Type Name Description
    List<String> topics
    In This Article
    Back to top npc-engine Unity integration