Class FormatEvent
Converts an object event in a formatted and pre-computed string.
Namespace: GGL.Events
Assembly: GGL.dll
Syntax
[AddComponentMenu("GG-Library/Events/Format Event")]
public class FormatEvent : MonoBehaviour
Fields
| Edit this page View SourcecomputeExpression
Wether or not Unity shoud pre-compute the given value to an expression
Declaration
[Tooltip("Wether or not Unity shoud pre-compute the given value to an expression")]
[Label("Pre-compute Expression")]
public bool computeExpression
Field Value
Type | Description |
---|---|
bool | Converts an object event in a formatted and pre-computed string. |
expression
Formattable string to compute with thegiven value.
Declaration
[Tooltip("Formattable string to compute with thegiven value. Do not forget to put '{0}'")]
[ShowIf("computeExpression")]
public string expression
Field Value
Type | Description |
---|---|
string | Converts an object event in a formatted and pre-computed string. |
Remarks
Do not forget to put '{0}'
format
Declaration
[Tooltip("String format. Do not forget to put '{0}'")]
public string format
Field Value
Type | Description |
---|---|
string | String format. |
Remarks
Do not forget to put '{0}'
Properties
| Edit this page View SourceOnFormat
Declaration
public UnityEvent<string> OnFormat { get; }
Property Value
Type | Description |
---|---|
UnityEvent<string> | Event triggered with the formatted output. |
Methods
| Edit this page View SourceFormat(bool)
Format a value as defined by format.
Declaration
public void Format(bool value)
Parameters
Type | Name | Description |
---|---|---|
bool | value |
Format(byte)
Format a value as defined by format.
Declaration
public void Format(byte value)
Parameters
Type | Name | Description |
---|---|---|
byte | value |
Format(char)
Format a value as defined by format.
Declaration
public void Format(char value)
Parameters
Type | Name | Description |
---|---|---|
char | value |
Format(decimal)
Format a value as defined by format.
Declaration
public void Format(decimal value)
Parameters
Type | Name | Description |
---|---|---|
decimal | value |
Format(double)
Format a value as defined by format.
Declaration
public void Format(double value)
Parameters
Type | Name | Description |
---|---|---|
double | value |
Format(short)
Format a value as defined by format.
Declaration
public void Format(short value)
Parameters
Type | Name | Description |
---|---|---|
short | value |
Format(int)
Format a value as defined by format.
Declaration
public void Format(int value)
Parameters
Type | Name | Description |
---|---|---|
int | value |
Format(long)
Format a value as defined by format.
Declaration
public void Format(long value)
Parameters
Type | Name | Description |
---|---|---|
long | value |
Format(object)
Format a value as defined by format.
Declaration
public string Format(object value)
Parameters
Type | Name | Description |
---|---|---|
object | value |
Returns
Type | Description |
---|---|
string | Converts an object event in a formatted and pre-computed string. |
Format(float)
Format a value as defined by format.
Declaration
public void Format(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value |
Format(string)
Format a value as defined by format.
Declaration
public void Format(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value |
Format(ushort)
Format a value as defined by format.
Declaration
public void Format(ushort value)
Parameters
Type | Name | Description |
---|---|---|
ushort | value |
Format(uint)
Format a value as defined by format.
Declaration
public void Format(uint value)
Parameters
Type | Name | Description |
---|---|---|
uint | value |
Format(ulong)
Format a value as defined by format.
Declaration
public void Format(ulong value)
Parameters
Type | Name | Description |
---|---|---|
ulong | value |