demo: fix warning

release-preview
mob-sakai 2024-09-30 02:12:44 +09:00
parent 1b678c68c6
commit 5f255ec6cd
1 changed files with 4 additions and 0 deletions
Assets/Demo/Cartoon FX & War FX Demo

View File

@ -80,7 +80,11 @@ namespace Coffee.UIExtensions.Demo
.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)