Skip to content

Commit

Permalink
demo: fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Sep 29, 2024
1 parent 1b678c6 commit 5f255ec
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ private static Object FindObjectOfType(string typeName)
.SelectMany(x => x.GetTypes())
.FirstOrDefault(x => x.Name == typeName);

#if UNITY_2023_2_OR_NEWER
return type == null ? null : FindFirstObjectByType(type);
#else
return type == null ? null : FindObjectOfType(type);
#endif
}

public void SetCanvasWidth(int width)
Expand Down

0 comments on commit 5f255ec

Please sign in to comment.