Search Issue Tracker
Fixed
Fixed in 10.0.3
Votes
0
Found in [Package]
10.0.0-pre.1
Issue ID
DANB-316
Regression
No
"'Object.FindObjectsOfType(Type)' is obsolete" warning is thrown by 2D Sprite Shape Extras "GenerateSpriteShapes.cs" script
Reproduction steps:
1. Open the “ObsoleteExtrasProject“ project
2. Make sure “Assets/Samples/2D SpriteShape” does not exist
3. Open the Package Manager and select the “2D SpriteShape“ package
4. Open the Samples tab and import the “Sprite Shape Extras” sample
5. Observe the Console
Expected result: no “obsolete” warnings are logged
Actual result: a “'Object.FindObjectsOfType(Type)' is obsolete” warning is logged
Reproduced in: 10.0.0-pre.1 (2023.1.0a20, 2023.1.0a23)
Not reproduced in: 5.3.0 (2020.3.42f1), 7.0.6 (2021.3.15f1), 9.0.1 (2022.2.1f1), 10.0.0-pre.1 (2023.1.0a19)
Reproduced using: macOS 13.0.1 (Intel), Windows 11 (by user)
Full warning: “Assets/Samples/2D SpriteShape/10.0.0-pre.1/Sprite Shape Extras/Scripts/GenerateSpriteShapes.cs(21,82): warning CS0618: 'Object.FindObjectsOfType(Type)' is obsolete: 'Object.FindObjectsOfType has been deprecated. Use Object.FindObjectsByType instead which lets you decide whether you need the results sorted or not. FindObjectsOfType sorts the results by InstanceID, but if you do not need this using FindObjectSortMode.None is considerably faster.'“
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
- GPU utilization increases by 20% on Meta Quest headsets when Render Graph is enabled on 6000.0.16f1 and higher
- Value on Slider (Int) control in UI Builder displays as default when saving UI Document
- Color mismatch in UI Builders Library panel when the Editors theme is set to Light Mode
- [Android ] "AndroidJNI.ToBooleanArray" returns a random non-zero value instead of "IntPtr.Zero" when the method argument is null
- Non-HDR color picker opens when selecting material color with HDR enabled
Resolution Note (fix version 10.0.3):
Fix for this issue is available on 2D SpriteShape package 10.0.3 and above