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
- Game View Tab Scale changes erratically when a Unity Tab is on a different screen with a differing Display Scale
- Six way lighting receiving wrong lighting from APV when set to World Space
- Crash on SortByExecutionOrder when interrupting the .androidpack import process
- ShaderGraph tab header changes the icon to the VFX Graph icon when ShaderGraph and VFX Graph with the same name are both opened
- The Build Profiles window has usability issues when the panel takes up less than 30% of the screen width
Resolution Note (fix version 10.0.3):
Fix for this issue is available on 2D SpriteShape package 10.0.3 and above