Components
keyboard_arrow_up
Add
Unity Ads Banner
-
Description
To obtain the Game Id we must go to developer dashboard > projects > select project:-
To obtain the Placement Id we must go to:-
An enter in banner:-
Unity Ads Banner
The Unity Ads Banner is a component allows to place ads in your application. Banner ads are a form of smaller sized graphical ads, typically including static images & text to convey a marketing message.
In order to use Unity Ads we must create an account in Unity. -
Events
- On Unity Banner Show
- Event called when the banner is first visible to the user.
- On Unity Banner Click
- Event called when the banner is clicked.
- On Unity Banner Error
- Event called when an error occurred, and the banner failed to load or show.
-
Procedures
- Show Unity Banner
- Method for requesting an ad for the banner.
- Is Banner Ready To Show
- Returns true if UnityAds is initialized. If its initialized you can use "Show unity Banner".
-
Properties
- Unity Game Id
- The Unity Game ID for your Project.
- Test Mode
- Enables Test Mode. While Test Mode is enabled, only test ads will be shown. Test ads do not generate any stats or revenue.
- Height
- To set the height of the banner.
- Height in percentage
- To set the percentage height of the banner.
- Width
- To set the width of the banner.
- Width in percentage
- To set the width in percentage of the banner.
- Visible
- Specifies whether the banner should be visible on the screen. The value is true if the component is displayed and false if it is hidden.
-
Example
- Adding Unity Ads Banner
- In this case we added 'Game Id' and 'Test Mode' in Event 'Initialize' from Screen.
Next, we added one Button and use the Event 'On Click' for show Banner.-
We compile and we already have our ad-