Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonavichus committed Jun 9, 2024
1 parent 288b2e5 commit 56ccbb4
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 19 deletions.
Binary file added GodotAndroidYandexAds/plugin/addons.zip
Binary file not shown.
62 changes: 43 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,47 @@
# Godot YandexAdsAndroid

This plugin is designed to connect Yandex advertising to godot.

## Instruction

### 1. Downloading
Download and unpack this archive.

Download and unpack this [archive](https://github.com/noctisalamandra/godot-yandex-ads-android/releases/latest).

![Download](screens/download.png)

### 2. Distribution by files
Move the contents of the 'yandex-plugin' folder to /android/plugins.

![Download](screens/file1.png)
Adding a folder to the root section of the project.

Move the 'yandex-ads-lib' folder to your project.

![Download](screens/file2.png)
![Project](screens/project.png)

### 3. Project Setup
In the project export, specify a custom build and plugins.

![Download](screens/plugins.png)
In the project settings, enable the plugin.

![Settings](screens/settings.png)

Next, create a node for the advertising module where you need it.
When exporting a project, enable "Use Grade Build".

![Download](screens/node.png)
![Plugin](screens/plugin.png)

In the "Permissions" section, enable "Access Network State" and "Internet".

Then create a node for the advertising module where you need it and connect the "yandex_ads" script to it.gd", which can be found in the folder that we added.

![Node](screens/node.png)

And insert the ID of your ad.

![Download](screens/key.png)
![Key](screens/key.png)

In build.gradle along the way "android/build/build.gradle" add the following code:

In build.gradle the module file of your application add the following code:
```
dependencies {
...
implementation 'com.yandex.android:mobileads:5.9.0'
implementation "com.yandex.android:mobileads:7.1.0"
}
```

Expand All @@ -50,12 +57,29 @@ android {

Then you can use the signals and functions written in the script to display ads.

![Download](screens/signals.png)
![Signals](screens/signals.png)

```
func _on_CoinPlus_pressed():
$Yandex.load_rewarded_video()
func _on_Yandex_rewarded_video_loaded():
$Yandex.show_rewarded_video()
func _ready():
$YandexAds.load_banner()
func _on_rewarded_pressed():
$YandexAds.load_rewarded_video()
func _on_interstitial_pressed():
$YandexAds.load_interstitial()
func _on_yandex_ads_rewarded_video_loaded():
$YandexAds.show_rewarded_video()
func _on_yandex_ads_interstitial_loaded():
$YandexAds.show_interstitial()
func _on_yandex_ads_banner_loaded():
$YandexAds.show_banner()
func _on_yandex_ads_rewarded(currency, ammount):
pass
```

An example of plug-in connection can be found [here](https://github.com/noctisalamandra/godot-yandex-ads-android-demo).
Binary file modified screens/download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screens/file1.png
Binary file not shown.
Binary file removed screens/file2.png
Binary file not shown.
Binary file modified screens/key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screens/node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screens/plugin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screens/plugins.png
Binary file not shown.
Binary file added screens/project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screens/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screens/signals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 56ccbb4

Please sign in to comment.