Table of Contents

Class PrefabComponentRegistration

Namespace
Axolotl2D.Prefabs
Assembly
Axolotl2D.dll

Maps a stable prefab component ID to a DI-created component type and data loader.

public sealed class PrefabComponentRegistration
Inheritance
PrefabComponentRegistration
Inherited Members

Properties

ComponentType

public Type ComponentType { get; }

Property Value

Type

Id

public string Id { get; }

Property Value

string

Methods

Create<TComponent>(string)

public static PrefabComponentRegistration Create<TComponent>(string id) where TComponent : Component, IPrefabDataReceiver

Parameters

id string

Returns

PrefabComponentRegistration

Type Parameters

TComponent

Create<TComponent, TData>(string, Action<TComponent, TData, PrefabLoadContext>)

public static PrefabComponentRegistration Create<TComponent, TData>(string id, Action<TComponent, TData, PrefabLoadContext> load) where TComponent : Component

Parameters

id string
load Action<TComponent, TData, PrefabLoadContext>

Returns

PrefabComponentRegistration

Type Parameters

TComponent
TData