Mobile Tools
Search
K

FAQ

The name 'FindObjectsByType' does not exist in the current context

Fix 1:
Upgrade Your Unity Editor to a LTS version of Unity greater than 2021.3.29
Fix 2 when it is not possible to upgrade to a LTS version:
Replace the new FindObjectsByType
With the old FindObjectsOfType which is marked as obsolete in the latest versions of Unity.
FindObjectsByType<Canvas>(FindObjectsSortMode.None);
//becomes
FindObjectsOfType<Canvas>();