Class PrefabInstanceModel
Class that represents a prefab instance model.
Inherited Members
Namespace: Evergine.Framework.Assets.AssetSources.Entities
Assembly: Evergine.Framework.dll
Syntax
public class PrefabInstanceModel : SceneItemModel
Constructors
PrefabInstanceModel()
Initializes a new instance of the PrefabInstanceModel class.
Declaration
public PrefabInstanceModel()
PrefabInstanceModel(Entity, PrefabInstanceModel)
Initializes a new instance of the PrefabInstanceModel class.
Declaration
public PrefabInstanceModel(Entity entity, PrefabInstanceModel root = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Entity | entity | The entity source. |
| PrefabInstanceModel | root | The root prefab instance model. |
Properties
EntityLinks
Gets or sets the dictionary of entity links. They are referenced by its Id.
Declaration
public Dictionary<Guid, PrefabEntityLink> EntityLinks { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<Guid, PrefabEntityLink> |
IdDictionary
Gets or sets the dictionary that translates source prefab ids with the instance prefab ids.
Declaration
public Dictionary<Guid, Guid> IdDictionary { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<Guid, Guid> |
Modifications
Gets or sets the prefab modification list.
Declaration
public List<PrefabModification> Modifications { get; set; }
Property Value
| Type | Description |
|---|---|
| List<PrefabModification> |
RemovedComponents
Gets or sets the removed component list.
Declaration
public List<Guid> RemovedComponents { get; set; }
Property Value
| Type | Description |
|---|---|
| List<Guid> |
Source
Gets or sets the prefab source of the instance.
Declaration
public Prefab Source { get; set; }
Property Value
| Type | Description |
|---|---|
| Prefab |
Methods
Clean()
Clean this entity model.
Declaration
public override void Clean()
Overrides
RandomizeId()
Changes the ids for a random one.
Declaration
public override void RandomizeId()
Overrides
RecreateEntity()
Construct the underlying entity.
Declaration
public override void RecreateEntity()