I'm working on creating a panorama view in AVP. When I got to this line of code Xcode says that "Type 'Entity' does not conform to protocol 'View'": private var realityView: RealityView<Entity>! as well as this line, with the same error message: private func setupPanoramaScene(for content: RealityView<Entity>.Content)
What should I put as a argument for reality view? It doesn't work without arguments either.
Hey @Sophiab20,
It's hard to understand what exactly your issue is with the limited code snippets provided.
It looks like you're having trouble passing around the RealityKitContent
object. You initialize a RealityView
with a closure that adds entities to the RealityKitContent
object. Simulating particles in your visionOS app provides an example of passing around the content
variable using the following:
RealityView { content in
buildEmitterContent(content, with: geometry.size.vector)
}
func buildEmitterContent(_ content: RealityViewContent, with geometryVector: SIMD3<Double>) {}
Let me know if this helps. If this doesn't help solve your issue could you provide more information as to what you are doing.
Thanks,
Michael