Exemplo n.º 1
0
    private GameObject CreateAd()
    {
        GameObject go = Instantiate(adPrefab);

        go.AddComponent <Ad>();
        go.layer = 8; // le layer "ads", a refaire en plus clair
        Ad ad = go.GetComponent <Ad>();

        ad.Window = allAds.GetRandomAd();
        ad.Build();
        OnAdCreation.Invoke(go);
        return(go);
    }