Table of Contents

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

T

The type of Unity component to be created. Must inherit from Component.

TC

The 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

config TC

The game asset configuration containing the prefab and other shared data.

Returns

T

A new instance of T initialized based on config.