Back to Filament

build

docs/android/dokka/filament-android/com.google.android.filament/-renderable-manager/-builder/build.md

1.75.0980 B
Original Source

//filament-android/com.google.android.filament/RenderableManager/Builder/build

build

[main]
open fun build(engine: Engine, entity: Int)

Adds the Renderable component to an entity.

If this component already exists on the given entity and the construction is successful, it is first destroyed as if destroy was called.

Parameters

main

enginereference to the Engine to associate this renderable with
entityentity to add the renderable component to

Throws

RuntimeExceptionif a runtime error occurred, such as running out of memory or other resources, or if a parameter to a builder function was invalid.