Post

Replies

Boosts

Views

Activity

Reply to VisonOS Image tracking help
Could you share the console crash log for more context? One idea coming to my mind: updateImage() might be called on a non-main thread. And afaik ModelEntity should be created on the main- tread. So you could try marking the function as @MainActor.
Topic: Spatial Computing SubTopic: ARKit Tags:
May ’24
Reply to Animating a Stepper Button on SwiftUI
You could use a SwiftUI 3D Transform and apply it on the view (https://developer.apple.com/documentation/swiftui/view/rotation3deffect(_:axis:anchor:anchorz:perspective:)) or put your view into a RealityKit Attachment and then rotate the Attachment Entity (https://developer.apple.com/documentation/realitykit/transform/rotation).
Topic: Design SubTopic: General Tags:
Aug ’24
Reply to RealityKit ShaderGraphMaterial parameters in Reality Composer Pro
Hi, you likely forgot to reapply the material to the mesh after updating its parameters. RealityKit Materials are value types. I always use a helper function like this: extension Entity { func modifyMaterials(_ closure: (Material) throws -> Material) rethrows { try children.forEach { try $0.modifyMaterials(closure) } guard var comp = components[ModelComponent.self] as? ModelComponent else { return } comp.materials = try comp.materials.map { try closure($0) } components[ModelComponent.self] = comp } }
Aug ’24
Reply to macOS Sequoia – NSToolbar on Catalyst disappeared
Okay so what I've discovered so far is that for some reason the toolbars NSToolBarDelegate is being reset to nil (in the code above you can see that I indeed set it) and thus no items are being added. I have absolutely no idea why though and tested countless different setups. The same exact app runs fine on Sonoma, so what could have changed here?
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’24
Reply to macOS Sequoia – NSToolbar on Catalyst disappeared
I finally found the culprit! »Dead Code Stripping« was set to »Yes«. If I set it to no, the toolbar magically appears and the delegate is set properly. Can anyone explain to me why that would happen or is it a bug? My toolbar code is wrapped in a compiler condition #if targetEnvironment(macCatalyst)…#endif but that's the only thing I could think of.
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’24