Does it work in non-Unity visionOS apps? It’s not clear to me from the documentation to that function that it’s meant to hide the hand gesture UI. It only mentions hiding the Home and SharePlay indicators. You might want to submit feedback to Apple via their Feedback Assistant that you would like a way to hide the hand gesture UI.
Edit: It looks like this needs to be set on the ImmersiveSpace. For example, I can edit MainApp/UnityVisionOSSettings.swift
in an Xcode project generated from Unity to add the function to the immersive space, making it look like this:
//
ImmersiveSpace(id: "Unbounded", for: UUID.self) { uuid in
PolySpatialContentViewWrapper(minSize: .init(1.000, 1.000, 1.000), maxSize: .init(1.000, 1.000, 1.000))
.environment(\.pslWindow, PolySpatialWindow(uuid.wrappedValue, "Unbounded", .init(1.000, 1.000, 1.000)))
.onImmersionChange() { oldContext, newContext in
PolySpatialWindowManagerAccess.onImmersionChange(oldContext.amount, newContext.amount)
}
KeyboardTextField().frame(width: 0, height: 0).modifier(LifeCycleHandlerModifier())
} defaultValue: { UUID() } .upperLimbVisibility(.automatic)
.immersionStyle(selection: .constant(.automatic), in: .automatic)
.persistentSystemOverlays(.hidden)
If I do that, then the menus are indeed hidden (although when you make the gesture, it pops up a little window telling you that they’re hidden, which somewhat defeats the purpose). I believe we can add an option to add that function to immersive spaces as part of the build process; I’ll add that to the list for a future release.