Post

Replies

Boosts

Views

Activity

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
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 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 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 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 PortalComponent – allow world content to peek out
Hi, thanks so much for the quick reply! I was afraid that would be the case, seems kinda wasteful with the mesh copy :/ Will definitely file an enhancement request! I got it working now: https://streamable.com/7nakkb But instead of using the ShaderGraphMaterial I put a plane behind the portal with an occlusion material. AFAIK ShaderGraphMaterial does not allow me to discard fragments though, correct? And I should probably be able to still use PBR materials instead of Unlit if I give both models the same ImageBasedLightReceiverComponent? Regarding ClippingPlane I'm curious: what would be a sample use case for the clipping inside of the portal world?
Topic: Graphics & Games SubTopic: General Tags:
Feb ’24
Reply to How to set the AttractionCenter for a ParticleEmitterComponent in a System with real time updates
Hi, what is your https://developer.apple.com/documentation/realitykit/particleemittercomponent/simulationspace property currently set to? Also is this set to true or false: https://developer.apple.com/documentation/realitykit/particleemittercomponent/particlesinherittransform ?
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Collisions are not detected if the entity is a child of a hand AnchorEntity
You probably need to set their physics simulation to .none (https://developer.apple.com/documentation/realitykit/anchoringcomponent/physicssimulation-swift.enum/none). The default is .isolated where AnchorEntities run in their own Physics Simulation scope.
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Gesture filtering using .targetedToEntity(where: QueryPredicate<Entity>) is not working
Did you call https://developer.apple.com/documentation/realitykit/component/registercomponent() at some point?
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to RealityKit/ARKit Environment Texturing broken on iOS 18
Found a workaround! Setting environmentTexturing = .manual brings back working environment texturing!
Topic: Spatial Computing SubTopic: ARKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Xcode 16 – Symbol not found: ShapeResource generateConvex
Nevermind, solved it by setting Other Linker Flags → -weak_framework RealityFoundation
Topic: Spatial Computing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to realitytool requires Metal for this operation and it is not available in this build environment
Feedback ID: FB15081450
Replies
Boosts
Views
Activity
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:
Replies
Boosts
Views
Activity
Sep ’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:
Replies
Boosts
Views
Activity
Sep ’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 } }
Replies
Boosts
Views
Activity
Aug ’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:
Replies
Boosts
Views
Activity
Aug ’24
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:
Replies
Boosts
Views
Activity
May ’24
Reply to MFMailComposeViewController in visionOS does not have a cancel button
Same exact issue here, I think this is a bug on Apples side. Any workarounds to fix this?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to RealityKit Systems Not Ticking Every Frame on visionOS
Instead of context.scene.performQuery did you try context.entities(matching: query, updatingSystemWhen: .rendering)?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’24
Reply to PortalComponent – allow world content to peek out
Feedback filed: FB13659588 Thank you!
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to PortalComponent – allow world content to peek out
Hi, thanks so much for the quick reply! I was afraid that would be the case, seems kinda wasteful with the mesh copy :/ Will definitely file an enhancement request! I got it working now: https://streamable.com/7nakkb But instead of using the ShaderGraphMaterial I put a plane behind the portal with an occlusion material. AFAIK ShaderGraphMaterial does not allow me to discard fragments though, correct? And I should probably be able to still use PBR materials instead of Unlit if I give both models the same ImageBasedLightReceiverComponent? Regarding ClippingPlane I'm curious: what would be a sample use case for the clipping inside of the portal world?
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’24