Emotion

😊 Emotion Class

Represents a character emotion with visual, audio, animation, and localization data.

Namespace: Esper.FeelSpeak Inherits from: FeelSpeakObject Type: class


📦 Fields

Access
Field
Type
Description

public

sprite

Sprite

A sprite that visually represents the emotion.

public

localizedDisplayNames

List<LocaleString>

Localized names for the emotion.

public

emotionName

string

Name of the emotion (used for fallback and search).

public

textSpeedMultiplier

float

Multiplier for text speed during dialogue.

public

textColor

Color

Text color for dialogue using this emotion.

public

sound

AudioClip

Sound played when the emotion is used.

public

animationName

string

Name of the animation to trigger.

public

animationLayer

int

The layer index of the animation to trigger.


🧾 Properties

Access
Property
Type
Description

public

DatabaseRecord

EmotionRecord

Returns a snapshot of this emotion’s database data.


📁 Static Fields

Access
Field
Type
Description

public static

resourcesPath

string

Path to emotion assets relative to the Resources folder.


🧰 Methods

Access
Method
Returns
Description

public

UpdateDatabaseRecord()

void

Updates the record of this object in the database.

public

CreateCopy()

Emotion

Creates and returns a copy of this emotion.

public

CopyData(Emotion other)

void

Copies all data from another emotion, excluding ID.

public

GetName()

string

Returns the localized name or fallback if localization is disabled.

public

ValidateLocalizedNames(bool skipInitialization = false)

void

Ensures all locales have corresponding name entries.

Getting an Emotion

You can get an Emotion at runtime with its ID or name with the FeelSpeak.GetEmotion method.

var myEmotion = FeelSpeak.GetEmotion("emotion name");

Last updated