Search Issue Tracker

Fixed

Fixed in 1.4.X

Votes

11

Found in [Package]

1.2.3

Issue ID

AVPB-599

Regression

No

[VisionOS] VisionOS FPS drops from 60 to 30 every frame when certain properties are modified

Package: PolySpatial visionOS

-

Reproduction steps:
1. Open the attached “Repro“ project
2. Build the project on “visionOS” platform (File > Build Settings > visionOS > Build)
3. Run the project on an Apple Vision Pro device or visionOS Simulator
4. Open the Profiler (Window > Analysis > Profiler) and connect it to the visionOS
5. Observe the FPS in the profiler
6. Press the “Script Driven Example” in the build
7. Observe the FPS in the profiler

Expected result: FPS stays at 60
Actual result: FPS drops to 30

Reproducible with: 1.1.6, 1.2.3 (2022.3.32f1)

Reproducible on: MR on visionOS 1.1 Simulator - built using M1 Max MacOS 14.4.1
Not reproducible on: No other environment tested

  1. Resolution Note:

    Ultimately, this is caused by an issue from Apple that we have reported to them as FB13566439: creating a new ShapeResource (as we do for UI images when their geometry changes, which it does when the affected properties like RectTransform.pivot and .sizeDelta change) every frame is expensive (creating one new ShapeResource per frame is enough to reproduce the reduction to 30fps in the simulator), and there's no way for us to cache/reuse ShapeResources that allows us to provide the same hover behavior (using a CollisionComponent in a transformed child doesn't allow hovering on the parent).

    We changed the behavior (in 1.2.3) so that we at least don't create a new ShapeResource if the component bounds don't change, which means that animating the color/alpha no longer reproduces the issue. For other properties, the only workaround we know of (for UI images that don't need to be hoverable/clickable) is to disable "Raycast Target" on the image component (which will prevent us from creating ShapeResources for them).

  2. Resolution Note (fix version 1.4):

    Will be fixed in the next 1.X release.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.