Skip to content

Commit e56590c

Browse files
committed
Check for a unity version
1 parent 9918828 commit e56590c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/BitMono.Unity.TestProject/Assets/Scripts/GameManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ public static GameManager Instance
3535
{
3636
if (instance == null)
3737
{
38+
#if UNITY_2020_1_OR_NEWER
3839
instance = FindFirstObjectByType<GameManager>();
40+
#else
41+
instance = FindObjectOfType<GameManager>();
42+
#endif
3943
}
4044
return instance;
4145
}

0 commit comments

Comments
 (0)