Table of Contents

Class DialogObject

Represents a single dialog entry with content, audio, and metadata. Create via Assets > Create > WitShells > Dialogs Manager > Dialog Object.

public class DialogObject : ScriptableObject
Inheritance
DialogObject
Extension Methods

Properties

ActionId

The action ID required to proceed.

public string ActionId { get; }

Property Value

string

Audio

Optional audio clip for this dialog.

public AudioClip Audio { get; set; }

Property Value

AudioClip

AudioLength

The length of the audio clip in seconds, or 0 if no audio.

public float AudioLength { get; }

Property Value

float

Content

The main content/text of the dialog.

public string Content { get; set; }

Property Value

string

DialogId

Optional unique identifier for this dialog.

public string DialogId { get; set; }

Property Value

string

DisplayDuration

The duration to display this dialog. Returns audio length if available, otherwise calculated from content length.

public float DisplayDuration { get; set; }

Property Value

float

Emotion

Optional emotion/mood indicator.

public DialogEmotion Emotion { get; set; }

Property Value

DialogEmotion

HasAudio

Whether this dialog has audio content.

public bool HasAudio { get; }

Property Value

bool

HasContent

Whether this dialog has text content.

public bool HasContent { get; }

Property Value

bool

Portrait

Optional portrait/avatar image for the speaker.

public Sprite Portrait { get; set; }

Property Value

Sprite

RequiresAction

Indicates if this dialog requires an action to be completed before proceeding.

public bool RequiresAction { get; }

Property Value

bool

SubtitleTextId

public string SubtitleTextId { get; set; }

Property Value

string

Tags

Optional tags for filtering or categorizing dialogs.

public string[] Tags { get; }

Property Value

string[]

Title

The title or speaker name for this dialog.

public string Title { get; set; }

Property Value

string

Methods

GetEstimatedReadingTime()

Gets the estimated reading time for the content in seconds.

public float GetEstimatedReadingTime()

Returns

float

HasTag(string)

Checks if this dialog has a specific tag.

public bool HasTag(string tag)

Parameters

tag string

The tag to check for.

Returns

bool

True if the dialog has the tag.