A์ ๋ํฐ์์ ์ ๋๋ชน ๋ถ์ผ๋ ค๊ณ ์ํฌํธํ๊ณ ํ ์คํธ ์์ด๋ ๊น์ง ๋ค ๋ฃ๊ณ
๋ฐฐ๋ ์คํฌ๋ฆฝํธ๋ ์ค๋ธ์ ํธ ๊น์ง ๋ถ์ฌ์ ์ ๋ํฐ ์์์ ํ๋ ์ด ํ ๋ ๋ฐฐ๋ ๋จ๋๊ฑฐ ๊น์ง ํ์ธํ๋๋ฐ
You are trying to create a MonoBehaviour using the 'new' keyword.This is not allowed. MonoBehaviours can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at all
UnityEngine.MonoBehaviour:.ctor()
ButtonBehaviour:.ctor()
GoogleMobileAds.Unity.BannerClient:CreateButtonBehavior() (at Assets/GoogleMobileAds/Platforms/Unity/BannerClient.cs:64)
GoogleMobileAds.Unity.BannerClient:ShowBannerView() (at Assets/GoogleMobileAds/Platforms/Unity/BannerClient.cs:143)
GoogleMobileAds.Unity.BannerClient:LoadAd(AdRequest) (at Assets/GoogleMobileAds/Platforms/Unity/BannerClient.cs:123)
GoogleMobileAds.Api.BannerView:LoadAd(AdRequest) (at Assets/GoogleMobileAds/Api/BannerView.cs:61)
AdmobBannerScript:RequestBanner() (at Assets/Scripts/AdmobBannerScript.cs:23)
AdmobBannerScript:Start() (at Assets/Scripts/AdmobBannerScript.cs:11)
๋ง๊ทธ๋๋ก ๋ชจ๋ ธ๋นํค์ด๋น์ด๋ฅผ ์์๋ฐ์ ์ปดํฌ๋ํธ๋ฅผ new๋ก ์์ฑํด์ ๋ฌธ์ ์๊ธด๊ฒ ๊ฐ์๋ฐ
๊ทผ๋ฐ ๋ฌธ์ ๋ ์ ์คํฌ๋ฆฝํธ๊ฐ ๋ด๊ฐ ๋ง๋ ๊ฒ ์๋๋ผ ๊ตฌ๊ธ ์ ๋๋ชน ์คํฌ๋ฆฝํธ๋ผ์ ๊ฑด๋๋ฆฌ๋ฉด ์๋ ๊บผ ๊ฐ์์ ใ ใ
Platforms/Unity์ ์๋ ์คํฌ๋ฆฝํธ๋ค์ ์๋ํฐ์์ ๋์๊ฐ๋ ๋๋ฏธ๋ฐฐ๋๋ผ์ ๊ธฐ๊ธฐ์์ ๋ค๋ฅด๊ฒ ์๋ํ ํ ๊ณ ์ ์๋ฌ๋ ์๋ฐ๊ฑฐ์ ๊ธฐ๊ธฐ์์ ์๋จ๋๊ฑด ๋ก๊ทธ๋ฅผ ๋ด์ผ ์๊ฑฐ๊ฐ๊ณ ์๋ํฐ์์ ์ ๊ฑฐ ๋์ฐ๊ณ ์ถ์๊ฑฐ๋ฉด ์์ ํด๋ด๋ ๋๋๋ฐ ๋์ถฉ ๋ดค์๋ ์ ButtonBehaviour๊ฐ ์ด๋ ๋ถ์ด์ผํ๋์ง ๊ฐ์ด ์์กํ๋ค ใ
์ด๋ ๊ฒ ๋ผ๋ ๋๊ธ๋ฌ์์ค์ ๊ณ ๋ง๋ค ์ง๊ธ ๋จธ๋ฆฌ ๊ตด๋ ค๊ฐ๋ฉด์ ์ฝ์งํ๋์ค ใ ใ
ButtonBehaviour๊ฐ MonoBehaviour๋ฅผ ์์ ์๋ฐ๊ฒ ํด๋ณด๋ฉด ๋๋ ค๋ ์ถ์๋ฐ
์๋๋ก์ด๋ ๋ฆฌ์กธ๋ฒ์์ ํฌ์ค๋ฆฌ์กธ๋ธํ๋๊น ๋๋ค ์๋ฐ
๋๋ ์กด๋ ๋น์ทํ ๋ฌธ์ ๋ฐ์ํด์ ๋ต๋ณ๋ฌ์