на моём телефоне не загружается реклама AdMob которую я добавил

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    using UnityEngine.SceneManagement;
    using GoogleMobileAds.Api;
    public class NewBehaviourScript : MonoBehaviour
    {
         // Start is called before the first frame update
         Rigidbody2D rb;
         Animator anim;
         public Joystick joystick;
         int run;
         float moveInput;
         public bool ground = false;
         public Transform groundcheck;
         public float checkradius;
         public LayerMask WhatIgGround;
         public GameObject panel;
         int c;
         float posup;
         public GameObject btn;
         public GameObject Player;
         public GameObject cube;
         public Text cointext;
         int jump;
         int sc;
         void Start()
         {
    
             posup = btn.transform.position.y;
             rb =GetComponent<Rigidbody2D>();
             anim = GetComponent<Animator>();
             c = 0;

             run = 5;
             jump = 8;
             sc = 0;
             checkradius = 0.05f;
         }

         // Update is called once per frame
         void FixedUpdate()
         {
             if(!PlayerPrefs.HasKey("coin")){
                 PlayerPrefs.SetInt("coin",c);
         }
             if(PlayerPrefs.HasKey("coin")){
                 PlayerPrefs.SetInt("coin",PlayerPrefs.GetInt("coin")+c);
        
         }
             if(posup != btn.transform.position.y && ground){
                 rb.velocity = (Vector2.up * jump);
         }
         moveInput = joystick.Horizontal;
         rb.velocity = new Vector2(moveInput * run, rb.velocity.y);
         if (moveInput > 0f && sc<=0){
             transform.localScale = new Vector2(2f,2f);
             anim.SetInteger("New Int",1);
             transform.localScale = new Vector2(2,2);
         }
        if (moveInput < 0f && sc<=0){
            transform.localScale = new Vector2(2f,2f);
            anim.SetInteger("New Int",1);
            transform.localScale = new Vector2(-2,2);
        }
        if (moveInput == 0f){
            anim.SetInteger("New Int",0);
        }
        ground = Physics2D.OverlapCircle(groundcheck.position,checkradius,WhatIgGround);
        if(PlayerPrefs.GetInt("blg") > 0){
            jump = 12;
        }
        if(PlayerPrefs.GetInt("glg") > 0){
            run = 10;
        }
        if(PlayerPrefs.GetInt("ylg") > 0){
            sc = 1;
            if (moveInput > 0f)
                transform.localScale = new Vector2(1f,1f);
            if (moveInput < 0f)
                transform.localScale = new Vector2(-1f,1f);
            else
                transform.localScale = new Vector2(1f,1f);
        }
    }
    public void PauseOn(){
        Time.timeScale = 0f;
        panel.gameObject.SetActive(true);
    }
    public void PauseOff(){
        Time.timeScale = 1f;
        panel.gameObject.SetActive(false);
    }
    public void replay(){
        Application.LoadLevel("Game");
        Time.timeScale = 1f;
    }
    public void home(){
    
        Application.LoadLevel("menu");
        Time.timeScale = 1f;
    }
    void OnTriggerStay2D(Collider2D other){
        if(other.gameObject.tag == "coin"){
            Destroy(other.gameObject);
            c++;
            cointext.text = c.ToString();
        }

    }

}


Ответы (0 шт):