Post

Replies

Boosts

Views

Activity

Reply to How to configure Spatial Audio on a Video Material?, Compile error.
Hello, We have SpatialAudioComponent set on the sphere to play audio when certain Entities within the sphere are tapped. That part works great. However, when we switch out the image material on the sphere with a VideoMaterial, the spatial sound doesn't appear to be enabled. The volume actually decreases. Is there some meta data we are missing somewhere to spatially play the audio in the video? Thank you! bvsdev
Topic: Spatial Computing SubTopic: General Tags:
Jul ’25
Reply to visionOS: Unable to programmatically close child WindowGroup when parent window closes
Hello, You could try making use of scene phases to alert the app when the parent window is being closed. See https://developer.apple.com/documentation/swiftui/scenephase Unfortunately, this approach doesn't work for us consistently in Immersive Space. In Vision 26, we have some additional tools available. Check out .restorationBehavior and .defaultLaunchBehavior described in this document. https://developer.apple.com/documentation/visionos/adopting-best-practices-for-scene-restoration/ Good luck!
Topic: Spatial Computing SubTopic: General Tags:
Aug ’25
Reply to RealityKit / visionOS – Memory not released after dismissing ImmersiveSpace with USDZ models
The OS is shutting down our app due to high memory usage. In our app, each “room” is an immersive space with a skybox. Within the room we navigate through a variety of spaces, each with its own texture to be used in the skybox material. Each time we swap out the skybox material the memory usage grows significantly. When we exit each room (immersive space), we remove the skybox (removeFromParent), assign it to nil, and have even tried to set the Texture to nil. Exiting a room doesn’t appear to release any of the allocated memory. Each time we enter a new room the memory usage climbs until we reach about 5G, by which time the app is closed by the system. Should we remove the UnlitMaterial reference in each room object as well upon exiting immersive space? We also observed that when we navigated through spaces that we’ve previously visited, the Persistent Bytes don’t grow even though we are releasing the Texture resource upon exiting a space, then re-creating the TextureResource when we enter it again. Could these Textures or Materials be cached by the system? Our images are high resolution 16K images. VisionOS 26, Xcode 26.1.1 Meanwhile we are going through the code base line by line to make sure we haven’t maintained a strong reference to the skybox or texture resource elsewhere. Attaching memory allocations at shutdown: Thanks, bvsdev
Topic: Spatial Computing SubTopic: General Tags:
3d
Reply to RealityKit / visionOS – Memory not released after dismissing ImmersiveSpace with USDZ models
Filed ticket number FB21327973 with sample test app demonstrating memory pressure with UnlitMaterial usage. Also seeing an Error on some images, although they are still being rendered on the device: IOSurface creation failed: e00002c2 parentID: 00000000 properties: { IOSurfaceAddress = 4380393472; IOSurfaceAllocSize = 20027995; IOSurfaceCacheMode = 0; IOSurfaceMapCacheAttribute = 1; IOSurfaceName = CMPhoto; IOSurfacePixelFormat = 1246774599; } IOSurface creation failed: e00002c2 parentID: 00000000 property: IOSurfaceCacheMode
Topic: Spatial Computing SubTopic: General Tags:
1d