Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.CustomToken Struct Reference

Public Member Functions

 CustomToken (int _ID, string _replacementText)
 The default Constructor. More...
 
string GetSafeReplacementText ()
 Converts the replacementText into a temporary one that has no colon or pipe characters, so that it is safe for saving. More...
 
void SetSafeReplacementText (string safeText)
 Assigns the replacementText from a safe-to-store string that was stored in save data. More...
 

Public Attributes

int ID
 
string replacementText
 

Detailed Description

A data container for custom tokens. MenuLabel elements and speech text will replace occurences of [token:ID] with the relevant token's replacementText string. Tokens are created and stored within the RuntimeVariables script.

Constructor & Destructor Documentation

◆ CustomToken()

AC.CustomToken.CustomToken ( int  _ID,
string  _replacementText 
)

The default Constructor.

Parameters
_IDThe token's unique identifier
_replacementTextThe token's replacement text.

Member Function Documentation

◆ GetSafeReplacementText()

string AC.CustomToken.GetSafeReplacementText ( )

Converts the replacementText into a temporary one that has no colon or pipe characters, so that it is safe for saving.

Returns
The converted replacementText that is safe for saving.

◆ SetSafeReplacementText()

void AC.CustomToken.SetSafeReplacementText ( string  safeText)

Assigns the replacementText from a safe-to-store string that was stored in save data.

Parameters
safeTextThe safe-to-store variant of replacementText that was stored in save data

Member Data Documentation

◆ ID

int AC.CustomToken.ID

The token's unique identifier

◆ replacementText

string AC.CustomToken.replacementText

The token's replacement text.