인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

sojae03067014's profile image
sojae03067014

asked

Unity Game Development (Unity 2D) - From Start to Deployment

Unity Ads

광고 시청이 되지 않습니다.

Written on

·

196

0

버튼을 눌러도 광고가 나오지 않습니다.

unity

Answer 3

0

agl05250070님의 프로필 이미지
agl05250070
Instructor

유니티 버전 문제가 의심이 되는데요,

Unity Ads Initialize를 직접 해주셔야 동작할 것 같습니다.

아래 코드와 같이 직접 초기화를 해주는 컴포넌트를 작성해서 시도해주세요.

using UnityEngine;

using UnityEngine.Advertisements;

 public class UnityAdsInitializer : MonoBehaviour

{

[SerializeField]

private string

androidGameId = "안드로이드 광고 번호",

iosGameId = "IOS 광고 번호";

[SerializeField]

private bool testMode;

void Start ()

{

string gameId = null;

#if UNITY_ANDROID

gameId = androidGameId;

#elif UNITY_IOS

gameId = iosGameId;

#endif

if (Advertisement.isSupported && !Advertisement.isInitialized) {

Advertisement.Initialize(gameId, testMode);

}

}

}

0

저도 버튼을 눌러도 광고가 나오지 않네요..
Service 탭에 있는 Dashboard를 누르면 제 계정으로 잘 연결되어 있고
Advanced 안에 있는 항목 체크되어있고 재시작 해봐도 안됩니다.

0

agl05250070님의 프로필 이미지
agl05250070
Instructor

Service 탭에 정상적으로 계정이 연결되어 있는지 확인해주세요.

만약 연결되어 있다면 유니티를 재시작하신 후 확인해주시기 바랍니다.

sojae03067014's profile image
sojae03067014

asked

Ask a question