logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityViewElementFactory

    Factory for creating Unity-specific view elements from GameObjects with automatic component management.

    Inheritance
    object
    UnityViewElementFactory
    Implements
    IFoundationViewElementFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.InterfaceAdapters.Entities.Factories
    Assembly: Serenity.UnityGlobal.InterfaceAdapters.dll
    Syntax
    public class UnityViewElementFactory : IFoundationViewElementFactory

    Constructors

    UnityViewElementFactory()

    Declaration
    public UnityViewElementFactory()

    Methods

    Create(object)

    Creates a foundation view element from the specified view element object.

    Declaration
    public IFoundationViewElement Create(object viewElement)
    Parameters
    Type Name Description
    object viewElement

    The view element object, expected to be a GameObject.

    Returns
    Type Description
    IFoundationViewElement

    A foundation view element instance attached to the GameObject.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the view element is not a GameObject.

    CreateUnityViewElement(object)

    Creates a Unity-specific view element from the specified view element object.

    Declaration
    public UnityViewElement CreateUnityViewElement(object viewElement)
    Parameters
    Type Name Description
    object viewElement

    The view element object, expected to be a GameObject.

    Returns
    Type Description
    UnityViewElement

    A Unity view element instance.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when the view element is null.

    ArgumentException

    Thrown when the view element is not a GameObject.

    Implements

    IFoundationViewElementFactory
    In this article
    © 2026 Serenity. All Rights Reserved