EasyTalk API
Loading...
Searching...
No Matches
EasyTalk.Nodes.Tags.TMPTag Class Reference

A class used to store TextMeshPro tag information. More...

Public Member Functions

 TMPTag (string name, string text, bool isCloseTag, int startIdx, int endIdx)
 Creates a new TMPTag object with the specified values.
 

Static Public Member Functions

static List< TMPTagFindTags (string text)
 Searches for TextMeshPro/HTML markup tags in the provided string and creates TMPTag objects for those which are found.
 
static string RemoveTags (string text)
 Removes all TextMeshPro/HTML markup tags from the specified string.
 

Public Attributes

string name
 The name/type of the TextMeshPro tag.
 
string fullTagText
 The full text of the tag.
 
bool isCloseTag = false
 Whether the tag is a closing tag.
 
int startIdx
 The index within the original string where this tag starts or started.
 
int endIdx
 The index within the original string where this tag ends or ended.
 

Detailed Description

A class used to store TextMeshPro tag information.

Constructor & Destructor Documentation

◆ TMPTag()

EasyTalk.Nodes.Tags.TMPTag.TMPTag ( string name,
string text,
bool isCloseTag,
int startIdx,
int endIdx )

Creates a new TMPTag object with the specified values.

Parameters
nameThe name/type of the tag.
textThe full text of the tag.
isCloseTagWhether the tag is a closing tag.
startIdxThe starting index of this tag in the original string it is/was in.
endIdxThe ending index of this tag in the original string it is/was in.

Member Function Documentation

◆ FindTags()

static List< TMPTag > EasyTalk.Nodes.Tags.TMPTag.FindTags ( string text)
static

Searches for TextMeshPro/HTML markup tags in the provided string and creates TMPTag objects for those which are found.

Parameters
textThe string to find tags in.
Returns
A List of TMPTags which were found in the provided string.

◆ RemoveTags()

static string EasyTalk.Nodes.Tags.TMPTag.RemoveTags ( string text)
static

Removes all TextMeshPro/HTML markup tags from the specified string.

Parameters
textThe string to remove tags from.
Returns
A modified version of the original string with all TextMeshPro/HTML markup tags removed.

Member Data Documentation

◆ endIdx

int EasyTalk.Nodes.Tags.TMPTag.endIdx

The index within the original string where this tag ends or ended.

◆ fullTagText

string EasyTalk.Nodes.Tags.TMPTag.fullTagText

The full text of the tag.

◆ isCloseTag

bool EasyTalk.Nodes.Tags.TMPTag.isCloseTag = false

Whether the tag is a closing tag.

◆ name

string EasyTalk.Nodes.Tags.TMPTag.name

The name/type of the TextMeshPro tag.

◆ startIdx

int EasyTalk.Nodes.Tags.TMPTag.startIdx

The index within the original string where this tag starts or started.