API reference
API reference
Select your platform
No SDKs available
No versions available

PanelCreator

PanelCreator

class PanelCreator(val registrationId: Int, panelCreator: (entity: Entity) -> PanelSceneObject) : PanelRegistration
PanelCreator is a class that allows you to specify the panel creator function for a panel. The panel creator function is any customized function that takes an entity as input and returns the @see PanelSceneObject.
Parameters
JVM
NameSummary
registrationId
The unique identifier for the panel.
panelCreator
A function that takes an entity as input and returns a PanelSceneObject.
See also

Constructors

NameSummary
PanelCreator
constructor(registrationId: Int, panelCreator: (entity: Entity) -> PanelSceneObject)

Properties

NameSummary
activityClass
var activityClass: Class<*>?
Activity class if the panel is powered by an activity and its layout/logic.
init
val init: PanelRegistration.(entity: Entity) -> Unit
layoutResourceId
var layoutResourceId: Int?
Layout resource id if the panel is view-based and created in the same immersive activity.
panelIntent
var panelIntent: <Error class: unknown class>?
Intent to launch the panel’s activity if the panel is activity-based.
registrationId
val registrationId: Int

Functions

NameSummary
config
fun config(overriding: Boolean = true, block: PanelConfigOptions.() -> Unit): PanelRegistration
panel
fun panel(overriding: Boolean = true, block: PanelSceneObject.() -> Unit): PanelRegistration
panelComponent
fun panelComponent(): Panel
Returns the @see Panel component that will be used to create the panel entity.
panelCreator
open fun panelCreator(scene: Scene, spatialContext: SpatialContext): (entity: Entity) -> PanelSceneObject
Returns a function that takes an entity as input and returns a PanelSceneObject. This function will be used to create the panel scene object in @see PanelCreationSystem. Whenever you create Entity with Panel(registrationId) component, this function will be called to create the panel scene object.
view
fun view(block: (<Error class: unknown class>) -> <Error class: unknown class>): PanelRegistration
Did you find this page helpful?
Thumbs up icon
Thumbs down icon