Search Issue Tracker
Fixed
Fixed in 2.X
Votes
2
Found in [Package]
2.5.2
Issue ID
SPLB-246
Regression
No
SplineAnimate.Update() takes up 100ms of CPU time and allocates 36.5 KB of GC when only 20 SplineAnimate objects are present
Reproduction steps:
1. Open the attached “Repro“ project
2. Open the “Assets/Scenes/SampleScene.unity“ Scene
3. Open the Profiler (Window > Analysis > Profiler)
4. Enter the Play Mode
5. Observe the CPU Usage of “SplineAnimate.Update()“ in the Profiler
Expected result: Takes very little time and no GC is allocated
Actual result: Takes a lot of time (100ms on M1 Max) and 36.5KB GC is allocated
Reproducible with: 2.4.0, 2.5.2 (2021.3.35f1, 2022.3.19f1, 2023.2.9f1, 2023.3.0b6)
Reproducible on: M1 MacOS 14.2
Not reproducible on: No other environment tested
Comments (2)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
fnnbrr
Feb 17, 2024 21:21
As a temp fix, make sure the Transform attached to the GameObject with your SplineContainer has a scale of (1, 1, 1). Certain methods (like SplineContainer.EvaluateUpVector()) run much slower logic if the scale is anything else. :)
Peter77
Feb 01, 2024 16:56
Related forum thread:
https://forum.unity.com/threads/in-67540-splineanimate-performance-issue-200ms-for-20-splineanimate-objects.1542557/