Ads
데모는 익명 계정으로 자동 로그인합니다. 이 계정은 쇼룸의 모든 데모에서 공유되므로 한 데모에서 얻은 아이템이나 재화가 다른 데모에도 반영됩니다. 로딩에 약간 시간이 걸립니다. 화면이 작다면 새 탭에서 열어 사용해 보세요.
개요
This demo banks one point each time an ad view completes and spends one point when a reward is claimed. The showroom runs as a WebGL page in the browser, where the mobile-only ad SDKs (Unity Ads, LevelPlay, AdMob) cannot run, so no real advertisement plays. Instead a panel stands in for the ad placement, and everything after the title decides “the view finished”, which is GS2’s part, runs for real.
체험 방법
- Balance under Ad view point shows the banked points, e.g. 0 view(s) banked.
- Press Ad break; an Advertisement panel opens and explains why no ad plays. Wait for the You can continue in 5s. countdown to finish.
- Press I finished watching; the page tells GS2 the view completed and asks for the point, and Balance goes up by 1. Pressing Close instead grants nothing.
- Press Spend; one point is consumed and Balance goes down by 1.
In a shipped title, the point is granted from the ad network’s completion callback where I finished watching sits here. Deciding that a view really happened is the title’s job.
사용하는 GS2 서비스
- GS2-AdReward: A GS2-AdReward namespace holds each player’s view points. Points are granted with
Gs2AdReward:AcquirePointByUserIdand consumed withGs2AdReward:ConsumePointByUserId; granting does not verify the view itself. - GS2-Exchange: Two GS2-Exchange rates define the transactions that grant one point (I finished watching) and consume one point (Spend), and run them server-side automatically.
GS2 Studio에서 사용하기
GS2 Studio의 Simple 모드에서 Add features 를 열고 Ads 의 Add 를 누르면 이 기능을 자신의 프로젝트에 가져올 수 있습니다. 패키지를 직접 지정하려면 Add from GitHub 를 선택하고 아래 패키지를 입력합니다.
https://github.com/gs2io/gs2-studio-package/tree/main/foundation-economy-ad/packages/foundation-economy-ad- Owner:
gs2io - Repository:
gs2-studio-package - Subdirectory:
foundation-economy-ad/packages/foundation-economy-ad