Parameter types
TMPEffects supports a variety of different parameter types that come with built-in parsing utilities (see the next section).
Supported types
This is the full list of currently supported parameter types:
- float
- int
- bool
- Color
- Vector2/3
- TypedVector2/3
- AnimationCurve
- OffsetProvider
- Array
Type formatting
This is an overview of how to correctly format the different parameter types by example.
Tip
For any of these types, you can also define valid keywords using a TMPKeywordDatabase.
Most of these types have pre-defined keywords set in the global TMPKeywordDatabase as well; especially for AnimationCurves and OffsetProviders you will want to almost exclusively use keywords.
- float: 2.54, 3
- int: 12
- bool: Either true or false
- Color: Either in HEX format #DEADBEEF, HSV format hsv(0.3,64,52) or RGB(A) format rgb(0,0.5,0.5)
- Vector2/3: (0.3, 22.4), (0.3, 22.4, 0)
- Anchor: Same as Vector2, but with leading "a:"; a:(0.3, 22.4)
- TypedVector2/3: Same as Vector2/3, with either leading "a:", leading "o:", or no prefix; depending on the prefix, will be interpreted as Anchor, Offset or Position; (0.3, 22.4), o:(0.3, 22.4), a:(0.3, 22.4)
- AnimationCurve: You may construct custom curves by specifying one of the predefined methods (cubic, quadratic, linear) or just a raw vector sequence. See AnimationCurveUtility for more info. quadratic((0,0),(0.2,0.7),(1,1)), (0,0),(0.2,0.7),(1,1)
- OffsetProvider: This exclusively uses keywords
- Array: Multiple of the desired type, separated by a semicolon; 0.3;4.82;1, red;green;blue, true;false;false