EntityManager

actual class EntityManager

Manages entity creation, destruction, and lifecycle.

EntityManager is responsible for allocating and releasing entity IDs, which are opaque 32-bit handles used throughout Filament to refer to scene objects and their components. It is recommended to cache the EntityManager instance.

Thread Safe: All operations on EntityManager are thread-safe.

expect class EntityManager

Manages entity creation, destruction, and lifecycle.

EntityManager is responsible for allocating and releasing entity IDs, which are opaque 32-bit handles used throughout Filament to refer to scene objects and their components. It is recommended to cache the EntityManager instance.

Thread Safe: All operations on EntityManager are thread-safe.

actual class EntityManager

Manages entity creation, destruction, and lifecycle.

EntityManager is responsible for allocating and releasing entity IDs, which are opaque 32-bit handles used throughout Filament to refer to scene objects and their components. It is recommended to cache the EntityManager instance.

Thread Safe: All operations on EntityManager are thread-safe.

actual class EntityManager

Manages entity creation, destruction, and lifecycle.

EntityManager is responsible for allocating and releasing entity IDs, which are opaque 32-bit handles used throughout Filament to refer to scene objects and their components. It is recommended to cache the EntityManager instance.

Thread Safe: All operations on EntityManager are thread-safe.

actual class EntityManager(jsEntityManager: EntityManager)

Manages entity creation, destruction, and lifecycle.

EntityManager is responsible for allocating and releasing entity IDs, which are opaque 32-bit handles used throughout Filament to refer to scene objects and their components. It is recommended to cache the EntityManager instance.

Thread Safe: All operations on EntityManager are thread-safe.

Constructors

Link copied to clipboard
constructor(jsEntityManager: EntityManager)

Types

Link copied to clipboard
actual object Companion
expect object Companion
actual object Companion
actual object Companion
actual object Companion

Properties

Link copied to clipboard
val nativeEntityManager: EntityManager
Link copied to clipboard
var nativeHandle: MemorySegment?
var nativeHandle: CPointer<FilaEntityManager>?

Functions

Link copied to clipboard
actual fun advanceEpoch()

Advance the entity manager epoch, invalidating all currently active entity IDs.

expect fun advanceEpoch()

Advance the entity manager epoch, invalidating all currently active entity IDs.

actual fun advanceEpoch()

Advance the entity manager epoch, invalidating all currently active entity IDs.

actual fun advanceEpoch()

Advance the entity manager epoch, invalidating all currently active entity IDs.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "throws UnsupportedOperationException — advanceEpoch is not bound in filament.js.")
actual fun advanceEpoch()

Advance the entity manager epoch, invalidating all currently active entity IDs.

Link copied to clipboard
actual fun create(): Entity

Create a new Entity.

actual fun create(n: Int): IntArray

Create multiple entities.

actual fun create(entities: IntArray): IntArray

Create entities into an existing array.

expect fun create(): Entity

Create a new Entity.

expect fun create(n: Int): IntArray

Create multiple entities.

expect fun create(entities: IntArray): IntArray

Create entities into an existing array.

actual fun create(): Entity

Create a new Entity.

actual fun create(n: Int): IntArray

Create multiple entities.

actual fun create(entities: IntArray): IntArray

Create entities into an existing array.

actual fun create(): Entity

Create a new Entity.

actual fun create(n: Int): IntArray

Create multiple entities.

actual fun create(entities: IntArray): IntArray

Create entities into an existing array.

actual fun create(): Entity

Create a new Entity.

actual fun create(n: Int): IntArray

Create multiple entities.

actual fun create(entities: IntArray): IntArray

Create entities into an existing array.

Link copied to clipboard
actual fun destroy(entity: Entity)

Destroy an entity.

actual fun destroy(entities: IntArray)

Destroy multiple entities.

expect fun destroy(entity: Entity)

Destroy an entity.

expect fun destroy(entities: IntArray)

Destroy multiple entities.

actual fun destroy(entity: Entity)

Destroy an entity.

actual fun destroy(entities: IntArray)

Destroy multiple entities.

actual fun destroy(entity: Entity)

Destroy an entity.

actual fun destroy(entities: IntArray)

Destroy multiple entities.

actual fun destroy(entity: Entity)

Destroy an entity.

actual fun destroy(entities: IntArray)

Destroy multiple entities.

Link copied to clipboard
actual fun getMaxEntityCount(): Int

Get the maximum number of entities that can be created.

expect fun getMaxEntityCount(): Int

Get the maximum number of entities that can be created.

actual fun getMaxEntityCount(): Int

Get the maximum number of entities that can be created.

actual fun getMaxEntityCount(): Int

Get the maximum number of entities that can be created.

@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "throws UnsupportedOperationException — getMaxEntityCount is not bound in filament.js.")
actual fun getMaxEntityCount(): Int

Get the maximum number of entities that can be created.

Link copied to clipboard
actual fun isAlive(entity: Entity): Boolean

Check whether an entity is alive (not destroyed).

expect fun isAlive(entity: Entity): Boolean

Check whether an entity is alive (not destroyed).

actual fun isAlive(entity: Entity): Boolean

Check whether an entity is alive (not destroyed).

actual fun isAlive(entity: Entity): Boolean

Check whether an entity is alive (not destroyed).

actual fun isAlive(entity: Entity): Boolean

Check whether an entity is alive (not destroyed).