Search Issue Tracker

Fixed in 2022.1.X

Votes

0

Found in

2019.4

2019.4.24f1

2020.3

2021.1

2021.2

2022.1

Issue ID

1348481

Regression

No

[UaaL][Metal] Graphic resources allocated in the scene are not released upon unloading the scene when using Metal

Metal

-

Steps to reproduce:
1. Open the project provided in the Google Drive link
2. Open 'both.xcworkspace' in Xcode which includes both Unity's Xcode project and the native launcher app
3. Might need to confirm the setup for UaaL locally (follow this guide: https://github.com/Unity-Technologies/uaal-example/blob/master/docs/ios.md)
4. Run build for Profiling (In Xcode: Product -> Profile)
5. When the Instrument tools window opens, select Allocations
6. Go to File > Recording Options, and check 'Discard events for freed memory' flag (optional, but easier to test this way)
7. Push the 'Record' button to run the app in the device
8. Press the 'Init' button to load Unity engine in the app
9. Press the 'Goto' button in the top middle of the screen, notice the resource allocation bar appear in the profiler
10. Push the 'Unload' button, the resource allocation bar is still present in the profiler

Expected results: Allocated resources are released when unloading the previous scene
Actual results: Allocated resources are not released when unloading the previous scene

Reproducible with: 2019.4.29f1, 2020.3.14f1, 2021.1.15f1, 2021.2.0b2, 2022.1.0a2

Tested with:
- iPad 9.7" 6th gen (14.4)
- iPad Air 2 (11.0.3)
- iPhone XR (13.4.1)
- iPhone 8 Plus (14.4.2)

Notes:
- If after the reproduction steps are complete you push the 'Init' button again, then the allocated resources are released and the bar in the profiler disappears
- On iPad Air 2 (11.0.3) the previous allocation is released only after initializing ('Init') Unity again and then pressing 'Goto' in order to allocate the same resources again

  1. Response avatar

    Resolution Note (fix version 2022.1):

    Fixed in 2022.1.0a3

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.