void Start() { if (pa == null) { pa = this.GetComponent <PlayAd>(); } if (Advertisement.isSupported) { Advertisement.Initialize(unityAdGameID); } }
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else if (instance != this) { Destroy(gameObject); return; } }