public void showWindowAd() { statusText.text = "showWindowAd"; if (windowAd != null) { windowAd.SetPointAndWidth(windowAdView.transform); windowAd.Show(); } }
public void showWindowAd() { statusText.text = "showWindowAd"; // angle int angleNumber = 0; if (angle.text != null && angle.text.Length > 0) { angleNumber = int.Parse(angle.text); } // x, y, width float x = 0; float y = 0; float w = 0; if (pointX.text != null && pointX.text.Length > 0) { x = float.Parse(pointX.text); } if (pointY.text != null && pointY.text.Length > 0) { y = float.Parse(pointY.text); } if (width.text != null && width.text.Length > 0) { w = float.Parse(width.text); } if (x > 0 && y > 0 && w > 0) { windowAdView.transform.position = new Vector3(x, y, 200); windowAdView.GetComponent <RectTransform>().sizeDelta = new Vector2(w, w); } if (windowAd != null) { windowAd.Show(windowAdView.transform, angleNumber); } }