I have been analyzing Apple's Gaussian-Splats-on-visionOS demo project, and it appears that the GaussianSplatComponent is treated differently than other Components.
In the function makeSplatEntity(), a GaussianSplatComponent is created and added to an Entity's components:
let comp = try assembleSplatComponent(from: buffers, isLinear: isLinear)
let entity = Entity()
entity.components.set(comp)
But when I check the entity's components collection before and after the add/set, nothing has changed. The entity still has the same children.
Is the GaussianSplatComponent stored in a different location in the Entity? If so, is it a public property I can inspect?
(Or is my interpretation of the components system wrong?)
Here are the results of print statements before and after the set()
BEFORE ADDING COMPONENT
Entity number of components: 2
Component: Transform(scale: SIMD3<Float>(1.0, 1.0, 1.0), rotation: simd_quatf(real: 1.0, imag: SIMD3<Float>(0.0, 0.0, 0.0)), translation: SIMD3<Float>(0.0, 0.0, 0.0))
Component: RealityKit.SynchronizationComponent
AFTER ADDING COMPONENT
Entity number of components: 2
Component: Transform(scale: SIMD3<Float>(1.0, 1.0, 1.0), rotation: simd_quatf(real: 1.0, imag: SIMD3<Float>(0.0, 0.0, 0.0)), translation: SIMD3<Float>(0.0, 0.0, 0.0))
Component: RealityKit.SynchronizationComponent