Contents

set(qualifiedComponentName:representation:)

Adds component data to an entity which will be written to a Reality file, but have no other effect.

Declaration

@MainActor @preconcurrency func set(qualifiedComponentName: String, representation: some Encodable) throws

Discussion

This function allows you to set component properties which have no available definition, such as properties that are only available on some platforms, or properties which don’t have an accessible runtime Swift type.

The following built-in components support setting properties using this function:

  • AnchoringComponent

  • DockingRegionComponent

  • EnvironmentBlendingComponent

  • ManipulationComponent

  • SceneUnderstandingComponent