Accessing parameters

It can be very useful to access the values and parameters within a tag via code. This is easily achieved using the RegionParameters structure in the UpdateParameters function, which provides access to each region of your texts.

public void UpdateParameters(RegionParameters parameters)
{
    // ...
    value = parameters.ModifiyFloat("a", fallbackValue);
}

Keywords

As seen in Keywords, keywords are plain words (without an equal sign) inside your tag (e.g., <mytag keyword1 keyword2 ...>). To access the list of these keywords, you can use:

var keywords = parameters.keywords
circle-exclamation

Float values

To access float value you can use:

// Returns true/false wheter the tag contains the modifier
parameters.HasFloat("modName");

// Returns the modifier value if exists otherwise the fallback value
parameters.ModifiyFloat("modName", fallbackValue); 

String values

You can also access string modifiers:

Last updated