强制转换为int

dev_chengFeng
ljsd 2020-08-27 20:18:36 +08:00
parent 2e74f05f60
commit ad74c26b48
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ public class NotchScreenUtil
try try
{ {
#if UNITY_IOS #if UNITY_IOS
height = Mathf.Floor(Convert.ToSingle(m_GetNotchHeight())); height = (int)Mathf.Floor(Convert.ToSingle(m_GetNotchHeight()));
#elif UNITY_ANDROID #elif UNITY_ANDROID
height = jo.CallStatic<int>("getNotchHeight"); height = jo.CallStatic<int>("getNotchHeight");
#endif #endif