Interface
- Namespace
- CoreFramework
Generic interface for implementing game asset factories in the Factory design pattern.
Provides a mechanism to create Unity Component instances of type T
using game asset configurations of type TC.
public interface IGameAssetFactory<out T, in TC> where T : Component where TC : GameAssetConfig
Type Parameters
TThe type of Unity component to be created. Must inherit from Component.
TCThe type of game asset configuration used to create the component. Must inherit from GameAssetConfig.
- Extension Methods
Methods
Create(TC)
Creates a Unity component of type T using the specified game asset configuration.
T Create(TC config)
Parameters
configTCThe game asset configuration containing the prefab and other shared data.
Returns
- T
A new instance of
Tinitialized based onconfig.