PixelCrushers.DialogueSystem.OverrideActorName Class Reference

This component allows you to override the actor name used in conversations, which is normally set to the name of the GameObject. More...

Inheritance diagram for PixelCrushers.DialogueSystem.OverrideActorName:
Collaboration diagram for PixelCrushers.DialogueSystem.OverrideActorName:

Public Member Functions

void OnEnable ()
 
void OnDisable ()
 
string GetName ()
 Gets the name, which is possibly the override name or its localized version. More...
 
string GetOverrideName ()
 Gets the name of the override, including parsing if it contains a [lua] or [var] tag. More...
 
string GetInternalName ()
 

Static Public Member Functions

static OverrideActorName GetOverrideActorName (Transform t)
 Searches a GameObject or its parent for an OverrideActorName component. More...
 
static string GetActorName (Transform t)
 Gets the name of the actor, either from the GameObject or its OverrideActorComponent if present. More...
 
static string GetInternalName (Transform t)
 Gets the internal database name of the actor, from the OverrideActorComponent's internalName if set, otherwise the overrideName, or the GameObject name if the GameObject doesn't have an OverrideActorName component. More...
 

Public Attributes

string overrideName
 Overrides the actor name used in conversations. More...
 
string internalName
 The internal name to use in the dialogue database when saving persistent data. More...
 
bool useLocalizedNameInDatabase = false
 If true, look up the localized field associated with the actor's name. More...
 

Detailed Description

This component allows you to override the actor name used in conversations, which is normally set to the name of the GameObject.

If the override name contains a [lua] or [var] tag, it parses the value.

Member Function Documentation

◆ GetActorName()

static string PixelCrushers.DialogueSystem.OverrideActorName.GetActorName ( Transform  t)
static

Gets the name of the actor, either from the GameObject or its OverrideActorComponent if present.

Returns
The actor name.
Parameters
tThe actor's transform.

◆ GetInternalName() [1/2]

string PixelCrushers.DialogueSystem.OverrideActorName.GetInternalName ( )

◆ GetInternalName() [2/2]

static string PixelCrushers.DialogueSystem.OverrideActorName.GetInternalName ( Transform  t)
static

Gets the internal database name of the actor, from the OverrideActorComponent's internalName if set, otherwise the overrideName, or the GameObject name if the GameObject doesn't have an OverrideActorName component.

Parameters
t
Returns

◆ GetName()

string PixelCrushers.DialogueSystem.OverrideActorName.GetName ( )

Gets the name, which is possibly the override name or its localized version.

Returns
The name.

◆ GetOverrideActorName()

static OverrideActorName PixelCrushers.DialogueSystem.OverrideActorName.GetOverrideActorName ( Transform  t)
static

Searches a GameObject or its parent for an OverrideActorName component.

Parameters
tThe GameObject to search.
Returns
The OverrideActorName component, or null if neither the GameObject nor its parent has one.

◆ GetOverrideName()

string PixelCrushers.DialogueSystem.OverrideActorName.GetOverrideName ( )

Gets the name of the override, including parsing if it contains a [lua] or [var] tag.

Returns
The override name, or null if not set.

◆ OnDisable()

void PixelCrushers.DialogueSystem.OverrideActorName.OnDisable ( )

◆ OnEnable()

void PixelCrushers.DialogueSystem.OverrideActorName.OnEnable ( )

Member Data Documentation

◆ internalName

string PixelCrushers.DialogueSystem.OverrideActorName.internalName

The internal name to use in the dialogue database when saving persistent data.

If blank, uses the override name.

◆ overrideName

string PixelCrushers.DialogueSystem.OverrideActorName.overrideName

Overrides the actor name used in conversations.

◆ useLocalizedNameInDatabase

bool PixelCrushers.DialogueSystem.OverrideActorName.useLocalizedNameInDatabase = false

If true, look up the localized field associated with the actor's name.


The documentation for this class was generated from the following file: