Interface IBuildableSpawner
The service for spawning buildables.
Namespace: OpenMod.Extensions.Games.Abstractions.Building
Assembly: OpenMod.Extensions.Games.Abstractions.dll
Syntax
public interface IBuildableSpawner
Methods
| Improve this Doc View SourceSpawnBuildableAsync(Vector3, String, IBuildableState)
Spawns a buildable at the given position.
Declaration
Task<IBuildable> SpawnBuildableAsync(Vector3 position, string buildableAssetId, IBuildableState state = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | position | The position to spawn the buildable at. |
| System.String | buildableAssetId | The ID of the buildable asset. |
| IBuildableState | state | The optional state for the buildable. |
Returns
| Type | Description |
|---|---|
| Task<IBuildable> | The created buildable if successful; otherwise, >null. |