logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityParserUtils

    Helpers to parse objects to specific Unity types with error handling

    Inheritance
    object
    UnityParserUtils
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    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
    In this article
    © 2026 Serenity. All Rights Reserved