FindObjectsOfType deprecated in later versions

In this lecture in the GameSessions script, Rick uses the FindObjectsOfType method (within the Awake() method). In my version 2023.2.5f1 this method has been deprecated and so I have used the following code instead which seems to work:

 int numGameSessions = FindObjectsByType<GameSession>(FindObjectsSortMode.None).Length;


1 Like

Privacy & Terms