Copyright © 2026 Unity Technologies
Thank you for reporting a bug to Unity. After reviewing the behavior, we've confirmed it aligns with the current design and intended use of the feature. The behavior we observe is that enabling the camera rect randomizer leads to an increase in RAM usage. On the machine we tested this on, the Graphics Memory grows from ~500 MB to 1000 MB. After the intial growth, the RAM usage fluctuates in a stable range, and does not continue to grow any further. If the randomizer script is disabled, the RAM usage quickly drops back to the initial 500 MB usage. Every time the camera rect is changed, the camera resolution is changed, too. This leads to camera-specific render targets being re-allocated in the new resolution. Temporary textures allocated via Render Graph will remain in the resource pool for 10 frames. This avoids having to re-allocate e.g. a texture that is used only every other frame. Instead, the texture from two frames ago is re-used. Because the script triggers allocation of a different size render target every frame, it leads to having 10 frames worth of render targets allocated. This explains the increase in RAM usage. Generally, changing the rect expensive, and should not be done every frame. The RAM overhead is expected.
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Enter the Play Mode
4. Open Memory Profiler (Window > Analysis > Memory Profiler)
5. Capture a Snapshot
6. Wait 2 minutes
7. Capture Snapshot again
8. Click Compare Snapshots
9. Select both Snapshots
10. Click All Of Memory tab
11. Compare Native memory
Expected result: Native, Untracked memory and FPS do not change
Actual result: Native and Untracked memory increases by 50-100 MB and FPS decreases
Reproducible with: 6000.0.68f1, 6000.3.11f1, 6000.4.0f1, 6000.5.0a7
Reproducible on:
Play Mode
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
Issues you vote on will appear here