Class UnityTimerFactory
Unity-specific factory for creating timer instances as MonoBehaviour components.
Provides creation of individual timer components with proper GameObject setup and initialization.
Implements
Inherited Members
Namespace: Serenity.Timer.Infrastructure.Services
Assembly: Serenity.UnityTimer.Infrastructure.dll
Syntax
public class UnityTimerFactory : TimerFactory
Constructors
UnityTimerFactory()
Declaration
public UnityTimerFactory()
Methods
CreateTimer(string, string)
Creates a new Unity timer instance with the specified identifier and name.
Instantiates a GameObject with the timer component and initializes it to default values.
Declaration
public ITimer CreateTimer(string id, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The unique identifier for the timer |
| string | name | The name to assign to the timer GameObject |
Returns
| Type | Description |
|---|---|
| ITimer | A Unity timer instance attached to a new GameObject |