Class UnityParserUtils
Helpers to parse objects to specific Unity types with error handling
Inherited Members
Namespace: Serenity.Global.Infrastructure.Utils
Assembly: Serenity.UnityGlobal.Infrastructure.dll
Syntax
public static class UnityParserUtils
Methods
ParseToCanvas(object)
Parses an object to a Canvas if possible; throws if not supported.
Declaration
public static Canvas ParseToCanvas(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | Object to parse |
Returns
| Type | Description |
|---|---|
| Canvas | Parsed Canvas |
Exceptions
| Type | Condition |
|---|---|
| Exception |
ParseToUnityObject(object)
Parses an object to a UnityEngine.Object if possible; throws if not supported.
Declaration
public static Object ParseToUnityObject(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | Object to parse |
Returns
| Type | Description |
|---|---|
| Object | Parsed UnityEngine.Object |
Exceptions
| Type | Condition |
|---|---|
| Exception |