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

Interface IEntitySpawner

The service for spawning entities.

Namespace: OpenMod.Extensions.Games.Abstractions.Entities
Assembly: OpenMod.Extensions.Games.Abstractions.dll
Syntax
public interface IEntitySpawner

Methods

| Improve this Doc View Source

SpawnEntityAsync(Vector3, String, IEntityState)

Spawns an entity at the given position.

Declaration
Task<IEntity> SpawnEntityAsync(Vector3 position, string entityAssetId, IEntityState state = null)
Parameters
Type Name Description
Vector3 position

The position to spawn the entity at.

System.String entityAssetId

The ID of the entity asset.

IEntityState state

The optional state for the entity to spawn.

Returns
Type Description
Task<IEntity>

The spawn entity if successful; otherwise null.

Extension Methods

DisposeHelper.DisposeSyncOrAsync(Object)