OpenMod Docs OpenMod Docs
OpenMod Docs OpenMod Docs
OpenMod .NET Plugin Framework.

Interface IEntity

Represents an entity such as players, NPCs, cars, etc.

Inherited Members
IGameObject.Transform
Namespace: OpenMod.Extensions.Games.Abstractions.Entities
Assembly: OpenMod.Extensions.Games.Abstractions.dll
Syntax
public interface IEntity : IGameObject

Properties

| Improve this Doc View Source

Asset

Gets the asset of the entity.

Declaration
IEntityAsset Asset { get; }
Property Value
Type Description
IEntityAsset
| Improve this Doc View Source

EntityInstanceId

Gets the unique instance ID of the entity.

Declaration
string EntityInstanceId { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

State

Gets the state of the entity.

Declaration
IEntityState State { get; }
Property Value
Type Description
IEntityState

Methods

| Improve this Doc View Source

SetPositionAsync(Vector3)

Sets the position of an entity.

Declaration
Task<bool> SetPositionAsync(Vector3 position)
Parameters
Type Name Description
Vector3 position

The position to set to.

Returns
Type Description
Task<System.Boolean>

True if successful; otherwise, false.

| Improve this Doc View Source

SetPositionAsync(Vector3, Quaternion)

Sets the position and rotation of an entity.

Declaration
Task<bool> SetPositionAsync(Vector3 position, Quaternion rotation)
Parameters
Type Name Description
Vector3 position

The position to set to.

Quaternion rotation

The rotation to set to.

Returns
Type Description
Task<System.Boolean>

True if successful; otherwise, false.

Extension Methods

DisposeHelper.DisposeSyncOrAsync(Object)