Class SceneItemModel
Base Entity Model class.
Inherited Members
Namespace: Evergine.Framework.Assets.AssetSources.Entities
Assembly: Evergine.Framework.dll
Syntax
public abstract class SceneItemModel
Constructors
SceneItemModel()
Initializes a new instance of the SceneItemModel class.
Declaration
public SceneItemModel()
Fields
PropertySeparator
The property path separator.
Declaration
protected const char PropertySeparator = '#'
Field Value
| Type | Description |
|---|---|
| char |
entity
The Entity.
Declaration
protected Entity entity
Field Value
| Type | Description |
|---|---|
| Entity |
id
The entity id.
Declaration
protected Guid id
Field Value
| Type | Description |
|---|---|
| Guid |
Properties
Entity
Gets or sets the entity.
Declaration
public Entity Entity { get; protected set; }
Property Value
| Type | Description |
|---|---|
| Entity |
EntityPath
Gets the entity path.
Declaration
public string EntityPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
Id
Gets or sets the Entity Id.
Declaration
public Guid Id { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid |
State
Gets the entity state.
Declaration
public AttachableObjectState State { get; }
Property Value
| Type | Description |
|---|---|
| AttachableObjectState |
Methods
Clean()
Clean this entity model.
Declaration
public abstract void Clean()
DefaultValues()
Sets the default values.
Declaration
protected virtual void DefaultValues()
GetSceneItem(Entity)
Gets a scene item model from an entity.
Declaration
public static SceneItemModel GetSceneItem(Entity entity)
Parameters
| Type | Name | Description |
|---|---|---|
| Entity | entity | The source entity. |
Returns
| Type | Description |
|---|---|
| SceneItemModel | A PrefabInstance model or a EntityItem model depending of the source. |
RandomizeId()
Changes the ids for a random one.
Declaration
public abstract void RandomizeId()
RecreateEntity()
Construct the underlying entity.
Declaration
public virtual void RecreateEntity()
Events
Recreated
Event called when the entity has been recreated.
Declaration
public event EventHandler<SceneItemModel> Recreated
Event Type
| Type | Description |
|---|---|
| EventHandler<SceneItemModel> |