# 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.

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

### Keywords

As seen in [Modifiers](/text-animator-unity/effects/how-to-edit-effects/modifiers.md#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:

```cs
var keywords = parameters.keywords
```

{% hint style="warning" %}

* The effect's name is a keyword itself (e.g., if I have `<mytag key1>`, the hashset will contain `[mytag, key1]`);
* Modifiers are ignored in this list (e.g., if I have `<mytag myMod=10.0>`, the hashset will contain `[mytag]`);
* Duplicate keywords are ignored (since we are using a HashSet).
  {% endhint %}

### Float values

To access float value you can use:

```cs
// 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:

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

// returns the modifier value if exists otherwise the fallback value
parameters.GetStringValueOrDefault("modName", fallbackValue); 
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.febucci.com/text-animator-unity/writing-custom-classes/writing-custom-effects-c/accessing-parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
