Contents

entity(for:)

Gets the identified attachment view as an entity, if the view with that identifier exists.

Declaration

func entity(for id: some Hashable) -> ViewAttachmentEntity?

Parameters

Return Value

The resolved attachment entity, or nil if RealityView can’t find an attachment view with the given id.

Discussion

Attachment entities are not automatically added to your RealityView’s content. To display an attachment, add it to your RealityView’s content using a function like RealityViewContent/add(_:).