Get it on Google Play


Wm뮤 :: Wm뮤

블로그 이미지
가끔 그림그리거나 3D모델링하거나
취미로 로봇만드는
퇴직한 전자과 게임프로그래머
2020.3.48f1 , 2022.3.6f1 주로 사용
모카쨩
@Ahzkwid

Recent Comment

Archive


'전체 글'에 해당되는 글 1016건

  1. 2021.03.01 유니티 애드몹 2021 2
  2. 2021.02.28 유니티 카드보드 VR 사용법
  3. 2021.02.27 티스토리 메인화면 편집
  4. 2021.02.25 크롤링
2021. 3. 1. 00:19 Unity

https://wmmu.tistory.com/entry/%EC%9C%A0%EB%8B%88%ED%8B%B0-%EC%95%A0%EB%93%9C%EB%AA%B9-2023

 

유니티 애드몹 2023

https://wmmu.tistory.com/entry/FireBase-%EC%95%A0%EB%93%9C%EB%AA%B9 유니티 애드몹 2021 얘내들은 툭하면 API를 바꾼다. 개빡칠노릇 설명서 developers.google.com/admob/unity/quick-start?hl=ko 해당링크에서 들어가보면 이런걸

wmmu.tistory.com

2023판

21판은 API 30까지만 지원된다

 

 

 

 

얘내들은 툭하면 API를 바꾼다. 개빡칠노릇

 

 

설명서

developers.google.com/admob/unity/quick-start?hl=ko

 

해당링크에서 들어가보면 이런걸 다운받아서 쓰라고 한다

 

 

 

 

github.com/googleads/googleads-mobile-unity/releases/tag/v5.4.0

 

Release Google Mobile Ads Unity Plugin v5.4.0 · googleads/googleads-mobile-unity

Release Notes: Add support for iOS14 with Google's SKAdNetwork identifiers automatically included in Info.plist. Added the RewardedInterstitialAd format. This feature is currently in private beta....

github.com

여기서 유니티 패키지를 다운받아서 푼다

 

유니티 버전은 2019.4.1f1이랑 2019.4.31f1사용했다

 

 

 

 

 

그리고 리졸브를 한다

 

누르고 생기는 스크립트오브젝트에 애드몹 코드를 입력한다

없으면 하단의 샘플코드를 넣는다

ca-app-pub-3940256099942544~3347511713

키가 이상하면 강종당하니 조심하자

 

 

apps.admob.com/

애드몹 코드는 애드몹사이트에서 여기에 숨겨져있다

 ~가 들어간 코드여야 한다

 

 

 

전면광고방법

developers.google.com/admob/unity/interstitial?hl=ko

 

 

 

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GoogleMobileAds.Api;
public class AdMobLoader : MonoBehaviour
{
#if UNITY_ANDROID
    string adUnitId = "ca-app-pub-3940256099942544/1033173712";
#elif UNITY_IOS
        string adUnitId = "ca-app-pub-3940256099942544/4411468910";
#else
        string adUnitId = "unexpected_platform";
#endif

    public void Start()
    {
        // Initialize the Google Mobile Ads SDK.
        MobileAds.Initialize(initStatus => { });

        RequestInterstitial();


    }

    public void Update()
    {
    }


    private InterstitialAd interstitial;

    private void RequestInterstitial()
    {
        // Initialize an InterstitialAd.
        interstitial = new InterstitialAd(adUnitId);
        // Create an empty ad request.
        AdRequest request = new AdRequest.Builder().Build();
        interstitial.OnAdLoaded += HandleOnAdLoaded;
        // Load the interstitial with the request.
        interstitial.LoadAd(request);

        // Called when an ad request has successfully loaded.
    }

    public float timer = 5f; //5초뒤 광고표시
    public void HandleOnAdLoaded(object sender, System.EventArgs args)
    {
        MonoBehaviour.print("HandleAdLoaded event received");

        //로드끝나면 timer만큼 지난뒤 광고표시
        Invoke(nameof(ShowInterstitial), timer);
    }
    void ShowInterstitial()
    {
        Debug.Log("광고가 표시됨");
        if (interstitial.IsLoaded())
        {
            interstitial.Show();
        }
    }

    private void InterstitialDestroy()
    {
        interstitial.Destroy();
    }
}

기본 샘플코드를 이용하여 만들어봤다

print같은 이상한 코드가 있지만 귀찮으니 안 고쳤다

 

코드위치는 여기고 /가 들어간 코드여야 한다

 

 

 

 

'Unity' 카테고리의 다른 글

유니티 동영상 촬영, 스크린샷 캡쳐  (0) 2021.03.18
유니티 카드보드 VR 사용법  (0) 2021.02.28
VRM 파일 만들기  (0) 2021.02.25
posted by 모카쨩
2021. 2. 28. 18:10 Unity

'Unity' 카테고리의 다른 글

유니티 애드몹 2021  (2) 2021.03.01
VRM 파일 만들기  (0) 2021.02.25
에셋스토어 업로드 2021  (0) 2021.02.22
posted by 모카쨩
2021. 2. 27. 00:28 공학기술

 

 

스킨위자드에서 저 버튼을 누르거나 

블로그주소/?mode=TabloidSetting

로 들어간다

'공학기술' 카테고리의 다른 글

배너링크 모음  (0) 2021.03.01
크롤링  (0) 2021.02.25
리얼리티 캡쳐 사용법 (RealityCapture)  (0) 2021.02.23
posted by 모카쨩
2021. 2. 25. 19:06 공학기술

셀레니움 크롤링써라

 

 

 

 

js같은거로 된거 링크 뜯어올때

 

F12 눌러서 개발자모드 펼치고 아래 순서대로 진행

 

 

 

posted by 모카쨩

  • total
  • today
  • yesterday

Recent Post

저사양 유저용 블로그 진입