Class UnityViewElementFactory
Factory for creating Unity-specific view elements from GameObjects with automatic component management.
Implements
Inherited Members
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. |