//구글콘솔 광고 추가가
728x90
반응형

며칠 전 고박사의 유니티 노트에서 쿠폰을 받아 득템한 Maze Rotator - Complete Mobile Game Template 에셋을 열어보기 위해 유니티 6을 깔았다.

 

The type or namespace name ‘UI’ does not exist in the namespace ‘UnityEngine’.

 

깔고 보니 이런 오류가 한가득 있길래 찾아봤다.

패키지를 새 프로젝트로 가져오는 게 문제가 될 수 있다 해서 프로젝트를 하나 만들어 두고 가져오기를 선택해서 깔아보니 확실히 50개정도의 오류에서 8개의 오류로 줄어든 것을 확인할 수 있었다. 

 

 

이제 이 8개의 오류를 봐보자. 그래도 다행인건 스크립트 하나에서 저 모든 오류들이 다 있는 거라는 거다.

UnityAdController에서 namespace들을 찾을 수가 없다는 내용들이다.

 

 

UnityAdController를 열어보니 붉은색의IUnityAdsInitializationListener, IUnityAdsLoadListener, IUnityAdsShowListener, BannerPosition들이 나를 반긴다.

그리고 위에 using 하나가 회색 처리 된 걸 확인했다.

누가 봐도 의심스러운 using UnityEngine.Advertisements;

 

https://docs.unity.com/ads/en-us/manual/InstallingTheUnitySDK

 

Installing the Advertisement Legacy package in Unity

To ensure that you are using the latest version of Unity Ads, we recommend that you install the Advertisement Legacy package from the Unity Editor Package Manager. Note: Starting from SDK version 4.4.1, the Unity Ads package is now called the Advertisement

docs.unity.com

그냥 깔아주면 된다. 유니티 패키지 매니저에서  Advertisement Legacy를 검색해서 가져오기를 해준다.

 

 

깔끔. 유니티로 돌아오면 모든 오류들이 없어진 걸 확인할 수 있다.

 

728x90
반응형

+ Recent posts