Adventure Creator  1.81.2
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2024
AC.ITranslatable Interface Reference
Inheritance diagram for AC.ITranslatable:
AC.ActionCharRename AC.ActionDialogOptionRename AC.ActionMenuState AC.ActionRename AC.ActionSpeech AC.ActionVarSet AC.Char AC.Container AC.Conversation AC.CursorIcon AC.CustomTranslatableExample AC.Document AC.GVar AC.Hotspot AC.HotspotPrefix AC.InvItem AC.LocalVariables AC.MenuButton AC.MenuCycle AC.MenuDrag AC.MenuInput AC.MenuJournal AC.MenuLabel AC.MenuSavesList AC.MenuSlider AC.MenuToggle AC.Objective AC.ObjectiveState AC.ObjectiveStateLabel AC.PopUpLabelData AC.SaveLabels AC.ScriptedActionListExample AC.Variables

Public Member Functions

string GetTranslatableString (int index)
 Gets the text to be translated, given its index. More...
 
int GetTranslationID (int index)
 Gets the translation ID of a given text index. More...
 
void UpdateTranslatableString (int index, string updatedText)
 
int GetNumTranslatables ()
 Gets the maximum number of possible translatable texts. More...
 
bool CanTranslate (int index)
 Checks if a given text index can and should be translated. More...
 
bool HasExistingTranslation (int index)
 Checks if a given text index has already been assigned a unique translation ID. More...
 
void SetTranslationID (int index, int lineID)
 Sets the translation ID of a given text index More...
 
string GetOwner (int index)
 Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element. More...
 
bool OwnerIsPlayer (int index)
 Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line. More...
 
AC_TextType GetTranslationType (int index)
 Gets the translation type of a given text index. More...
 

Detailed Description

An interface for any component that has translatable strings.

Member Function Documentation

◆ CanTranslate()

◆ GetNumTranslatables()

◆ GetOwner()

string AC.ITranslatable.GetOwner ( int  index)

Gets the name of the translatable text's owner. In the case of speech text, it is the name of the character. In the case of menu element text, it is the name of the menu element.

Parameters
indexThe index of the translatable text
Returns
The name of the translatable text's owner.

Implemented in AC.Char, AC.Hotspot, AC.MenuSavesList, AC.InvItem, AC.ActionVarSet, AC.MenuCycle, AC.Conversation, AC.MenuJournal, AC.GVar, AC.HotspotPrefix, AC.MenuLabel, AC.MenuSlider, AC.MenuButton, AC.MenuToggle, AC.Objective, AC.ActionSpeech, AC.Document, AC.MenuInput, AC.ActionMenuState, AC.ObjectiveStateLabel, AC.ObjectiveState, AC.LocalVariables, AC.MenuDrag, AC.PopUpLabelData, AC.Container, AC.ActionDialogOptionRename, AC.Variables, AC.CursorIcon, AC.ScriptedActionListExample, AC.ActionCharRename, AC.SaveLabels, AC.ActionRename, and AC.CustomTranslatableExample.

◆ GetTranslatableString()

◆ GetTranslationID()

◆ GetTranslationType()

◆ HasExistingTranslation()

bool AC.ITranslatable.HasExistingTranslation ( int  index)

◆ OwnerIsPlayer()

bool AC.ITranslatable.OwnerIsPlayer ( int  index)

Checks if the translatable text's owner is a Player. This is necessary for speech lines, since multiple player prefabs can feasibly share the same line.

Parameters
indexThe index of the translatable text
Returns
True if the translatable text's owner is a Player.

Implemented in AC.Char, AC.Hotspot, AC.MenuSavesList, AC.InvItem, AC.ActionVarSet, AC.MenuCycle, AC.Conversation, AC.MenuJournal, AC.GVar, AC.HotspotPrefix, AC.MenuLabel, AC.MenuSlider, AC.MenuButton, AC.ActionSpeech, AC.MenuToggle, AC.Objective, AC.Document, AC.MenuInput, AC.ActionMenuState, AC.ObjectiveStateLabel, AC.ObjectiveState, AC.LocalVariables, AC.MenuDrag, AC.PopUpLabelData, AC.Container, AC.ActionDialogOptionRename, AC.Variables, AC.CursorIcon, AC.ScriptedActionListExample, AC.ActionCharRename, AC.SaveLabels, AC.ActionRename, and AC.CustomTranslatableExample.

◆ SetTranslationID()