Class OptionalRectConverter
UXML attribute converter for optional Rect values.
Inheritance
OptionalRectConverter
Inherited Members
Namespace: Unity.AppUI.Editor
Assembly: Unity.AppUI.Editor.dll
Syntax
public class OptionalRectConverter : OptionalConverter<Rect>
Methods
ToString(Optional<Rect>)
Converts an optional Rect into its UXML attribute representation.
Declaration
public override string ToString(Optional<Rect> value)
Parameters
| Type | Name | Description |
|---|---|---|
| Optional<Rect> | value | The value to convert. |
Returns
| Type | Description |
|---|---|
| string | The rectangle formatted as |
Overrides
TryParse(string, out Rect)
Tries to parse the attribute value as a Rect.
Declaration
protected override bool TryParse(string value, out Rect v)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The string to parse, in the form |
| Rect | v | The parsed rectangle, or the default rectangle if parsing failed. |
Returns
| Type | Description |
|---|---|
| bool | True if the value could be parsed, False otherwise. |