Class DialogObject
- Namespace
- WitShells.DialogsManager
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
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
Content
The main content/text of the dialog.
public string Content { get; set; }
Property Value
DialogId
Optional unique identifier for this dialog.
public string DialogId { get; set; }
Property Value
DisplayDuration
The duration to display this dialog. Returns audio length if available, otherwise calculated from content length.
public float DisplayDuration { get; set; }
Property Value
Emotion
Optional emotion/mood indicator.
public DialogEmotion Emotion { get; set; }
Property Value
HasAudio
Whether this dialog has audio content.
public bool HasAudio { get; }
Property Value
HasContent
Whether this dialog has text content.
public bool HasContent { get; }
Property Value
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
SubtitleTextId
public string SubtitleTextId { get; set; }
Property Value
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
Methods
GetEstimatedReadingTime()
Gets the estimated reading time for the content in seconds.
public float GetEstimatedReadingTime()
Returns
HasTag(string)
Checks if this dialog has a specific tag.
public bool HasTag(string tag)
Parameters
tagstringThe tag to check for.
Returns
- bool
True if the dialog has the tag.