Esempio n. 1
0
        public void OnClickShowWebview()
        {
                        #if UNITY_ANDROID
            int marginPx = (int)GarlicUtils.DPToPx(30f);
                        #elif UNITY_IOS
            int marginPx = (int)GarlicUtils.PtToPx(50);
                        #endif

            GarlicWebview.Instance.SetMargins(marginPx, marginPx, marginPx, marginPx);
            GarlicWebview.Instance.SetFixedRatio(2, 1);
            GarlicWebview.Instance.Show(urlText.text);
        }
Esempio n. 2
0
        public void OnClickShowWebview()
        {
#if UNITY_ANDROID
            int marginPx = (int)GarlicUtils.DPToPx(30f);
#elif UNITY_IOS
            int marginPx = (int)GarlicUtils.PtToPx(50);
#else
            int marginPx = 0;
            Debug.LogError("Invalid Platform!(Supports only Android & iOS.)");
            return;
#endif

            GarlicWebview.Instance.SetMargins(marginPx, marginPx, marginPx, marginPx);
            GarlicWebview.Instance.SetFixedRatio(2, 1);
            GarlicWebview.Instance.Show(urlText.text);
        }