//获取native 的配置信息 static IEnumerator UF_IGetNativeInfo() { Debugger.UF_Log("Start Get Native info"); float starttick = System.Environment.TickCount; float interval = 1000; VendorSDK.UF_Call("onNativeInfo", ""); while (NativeInfo == null) { if (NativeInfo != null || Mathf.Abs(System.Environment.TickCount - starttick) > interval) { Debugger.UF_Error("Get Native Info Timeout"); break; } yield return(null); } if (NativeInfo != null) { Debugger.UF_Log(string.Format("Native Info:\n{0}", NativeInfo.UF_Serialize())); //自动适配刘海屏幕 UIManager.UF_GetInstance().UF_AutoFitNotchScreen(); } else { Debugger.UF_Warn("Can not Get Native Info !"); } }
public static void UF_SafeCall(string method, string arg) { FrameHandle.UF_CallMethod( () => { VendorSDK.UF_Call(method, arg); } ); }