Back to Filament

attachTo

docs/android/dokka/filament-android/com.google.android.filament.android/-ui-helper/attach-to.md

1.75.0822 B
Original Source

//filament-android/com.google.android.filament.android/UiHelper/attachTo

attachTo

[main]
open fun attachTo(view: SurfaceView)

Associate UiHelper with a SurfaceView. As soon as SurfaceView is ready (i.e. has a Surface), we'll create the EGL resources needed, and call user callbacks if needed.

[main]
open fun attachTo(view: TextureView)

Associate UiHelper with a TextureView. As soon as TextureView is ready (i.e. has a buffer), we'll create the EGL resources needed, and call user callbacks if needed.

[main]
open fun attachTo(holder: SurfaceHolder)

Associate UiHelper with a SurfaceHolder. As soon as a Surface is created, we'll create the EGL resources needed, and call user callbacks if needed.