📜  unity 奖励广告 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:23.331000             🧑  作者: Mango

代码示例1
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Advertisements;

[RequireComponent (typeof (Button))]
public class RewardedAdsButton : MonoBehaviour, IUnityAdsListener {

    #if UNITY_IOS
    private string gameId = "1486551";
    #elif UNITY_ANDROID
    private string gameId = "1486550";
    #endif

    Button myButton;
    public string mySurfacingId = "rewardedVideo";

    void Start () {   
        myButton = GetComponent