Post not yet marked as solved
The same is happening on my MacBook Pro 16" running Big Sur with no external display plugged in. Right now it shows that I am using the Intel UHD graphics.
Post not yet marked as solved
I am registering my component before use and I am still getting an EXC_BAD_ACCESS and the old "No storage has been registered for component type 3445452219525568944(ARSDKPrototypePlatform.ManagedARObjectComponent)"I have a component and protocolstruct ManagedARObjectComponent: Component, Codable, Equatable {
var isDeployed = false
var id: Int
public static func == (lhs: ManagedARObjectComponent, rhs: ManagedARObjectComponent) -> Bool {
return lhs.id == rhs.id
}
}
protocol HasManagement {
var managedObject: ManagedARObjectComponent { get set }
}and when I instantiate the ARView I register this componentfunc makeUIView(context: Context) -> ARView {
let arView = sessionDelegate.arView
// Configure the AR session for horizontal plane tracking.
let arConfiguration = ARWorldTrackingConfiguration()
arConfiguration.planeDetection = .horizontal
arView.session.run(arConfiguration)
ManagedARObjectComponent.registerComponent()
return arView
}I have a class that conforms to the `HasManagement` protocolclass AREntity: Entity, HasModel, HasCollision, HasAnchoring, HasManagement {
var managedObject: ManagedARObjectComponent {
get { components[ManagedARObjectComponent] ?? ManagedARObjectComponent(id: -1) }
set { components[ManagedARObjectComponent] = newValue }
}
init(id: Int) {
super.init()
self.managedObject = ManagedARObjectComponent(id: id)
// ... more initialization code
}
}I tried registering it in the function where I first instantiate the `AREntity`@discardableResult
func generateBox() -> AREntity {
ManagedARObjectComponent.self.registerComponent()
let entity = AREntity(id: UUID().hashValue)
arView.scene.addAnchor(entity)
return entity
}I still get the error I still do not see this component when I `po` the components on the object itself. With such scant documentation, I can't seem to find what I am doing wrong. Any help would be appreciated.