demo: fix warning

This commit is contained in:
mob-sakai
2024-09-30 02:12:44 +09:00
parent 1b678c68c6
commit 5f255ec6cd

View File

@@ -80,7 +80,11 @@ namespace Coffee.UIExtensions.Demo
.SelectMany(x => x.GetTypes()) .SelectMany(x => x.GetTypes())
.FirstOrDefault(x => x.Name == typeName); .FirstOrDefault(x => x.Name == typeName);
#if UNITY_2023_2_OR_NEWER
return type == null ? null : FindFirstObjectByType(type);
#else
return type == null ? null : FindObjectOfType(type); return type == null ? null : FindObjectOfType(type);
#endif
} }
public void SetCanvasWidth(int width) public void SetCanvasWidth(int width)