Class EntityItemModel
Entity model class.
Inherited Members
Namespace: Evergine.Framework.Assets.AssetSources.Entities
Assembly: Evergine.Framework.dll
Syntax
public class EntityItemModel : SceneItemModel
Constructors
EntityItemModel()
Initializes a new instance of the EntityItemModel class.
Declaration
public EntityItemModel()
EntityItemModel(Entity, bool)
Initializes a new instance of the EntityItemModel class.
Declaration
public EntityItemModel(Entity entity, bool maintainPrefabs = true)
Parameters
Type | Name | Description |
---|---|---|
Entity | entity | The entity. |
bool | maintainPrefabs | Indicates whether the prefab instances should be preserved or flattened to entities. |
Fields
isEnabled
Determines if the entity is enabled.
Declaration
protected bool isEnabled
Field Value
Type | Description |
---|---|
bool |
isSerializable
Checks if the entity is serializable.
Declaration
protected bool isSerializable
Field Value
Type | Description |
---|---|
bool |
isStatic
Indicates whether the entity is static.
Declaration
protected bool isStatic
Field Value
Type | Description |
---|---|
bool |
name
The name of the entity.
Declaration
protected string name
Field Value
Type | Description |
---|---|
string |
tag
Represents the entity tag.
Declaration
protected string tag
Field Value
Type | Description |
---|---|
string |
Properties
Children
Gets or sets the children list.
Declaration
[EvergineMember(8)]
public List<SceneItemModel> Children { get; set; }
Property Value
Type | Description |
---|---|
List<SceneItemModel> |
Components
Gets or sets the components list.
Declaration
[EvergineMember(7)]
public List<Component> Components { get; set; }
Property Value
Type | Description |
---|---|
List<Component> |
IsEnabled
Gets or sets a value indicating whether this instance is active.
Declaration
[EvergineMember(2)]
public bool IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsStatic
Gets or sets a value indicating whether this instance is static. Once an entity is initialized, it cannot be displaced, rotated, or scaled.
Declaration
[EvergineMember(4)]
public bool IsStatic { get; set; }
Property Value
Type | Description |
---|---|
bool |
Name
Gets or sets the entity name.
Declaration
[EvergineMember(0)]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Tag
Gets or sets the tag.
Declaration
[EvergineMember(1)]
public string Tag { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
AddChild(SceneItemModel, int)
Adds a child.
Declaration
public virtual void AddChild(SceneItemModel newChild, int order = 0)
Parameters
Type | Name | Description |
---|---|---|
SceneItemModel | newChild | Child base entity model. |
int | order | The order. |
AddComponent(Component)
Adds components.
Declaration
public void AddComponent(Component c)
Parameters
Type | Name | Description |
---|---|---|
Component | c | The component instance. |
Clean()
Cleans this entity model.
Declaration
public override void Clean()
Overrides
DetachChild(Guid)
Detaches the child.
Declaration
public virtual void DetachChild(Guid childId)
Parameters
Type | Name | Description |
---|---|---|
Guid | childId | The ID of the child. |
RandomizeId()
Changes the IDs to random ones.
Declaration
public override void RandomizeId()
Overrides
RecreateEntity()
Recreates the underlying entity.
Declaration
public override void RecreateEntity()
Overrides
RemoveComponent(Component)
Removes the component.
Declaration
public void RemoveComponent(Component component)
Parameters
Type | Name | Description |
---|---|---|
Component | component | The component. |