Code Monkey home page Code Monkey logo

Comments (9)

AGulev avatar AGulev commented on June 20, 2024

@OURABIG please share what exactly errors you have

from defold-extension-unity-ads.

OURABIG avatar OURABIG commented on June 20, 2024

@OURABIG please share what exactly errors you have

well everything i can't even setup the ads or initialize them i just got confused to do it

from defold-extension-unity-ads.

AGulev avatar AGulev commented on June 20, 2024

Did you see the example in this repo?

from defold-extension-unity-ads.

OURABIG avatar OURABIG commented on June 20, 2024

Did you see the example in this repo?

yes of course and i didn't understand a lot it's a bit advance what should i create first

from defold-extension-unity-ads.

AGulev avatar AGulev commented on June 20, 2024

you said :

i always have errors

What kind of errors do you have?
The install process is simple as:

  • initialize
  • wait when initialization is done
  • show ads

from defold-extension-unity-ads.

OURABIG avatar OURABIG commented on June 20, 2024

you said :

i always have errors

What kind of errors do you have? The install process is simple as:

* initialize

* wait when initialization is done

* show ads

so i add the direcrly in .gui_script no need to another script

from defold-extension-unity-ads.

OURABIG avatar OURABIG commented on June 20, 2024

you said :

i always have errors

What kind of errors do you have? The install process is simple as:

* initialize

* wait when initialization is done

* show ads

i add initialize function and unity ads code then i go when button is clicked show ads is this what i need to do

from defold-extension-unity-ads.

AGulev avatar AGulev commented on June 20, 2024
  1. Initialize SDK with callback (third parameter isDebug):
    https://github.com/AGulev/DefVideoAds/blob/abaeb8f6902457c638b3b08ab4e69ee567dd8b79/example/ui.gui_script#L217

Here is an example of the callback function:
https://github.com/AGulev/DefVideoAds/blob/abaeb8f6902457c638b3b08ab4e69ee567dd8b79/example/ui.gui_script#L76-L189

  1. Wait for unityads.EVENT_COMPLETED in unityads.MSG_INIT :

https://github.com/AGulev/DefVideoAds/blob/abaeb8f6902457c638b3b08ab4e69ee567dd8b79/example/ui.gui_script#L79-L82

  1. When it's done, you are able to use ADS functions. First of all you need to load ADS (in this function you use placementId of your AD as the first/only parameter):

https://github.com/AGulev/DefVideoAds/blob/abaeb8f6902457c638b3b08ab4e69ee567dd8b79/example/ui.gui_script#L341

  1. When loading is done, you'll get unityads.EVENT_LOADED for message_id unityads.MSG_LOAD in the callback:

https://github.com/AGulev/DefVideoAds/blob/abaeb8f6902457c638b3b08ab4e69ee567dd8b79/example/ui.gui_script#L130-L134

  1. Now you can show ADS (in this function you use placementId of your AD as the first/only parameter):

https://github.com/AGulev/DefVideoAds/blob/abaeb8f6902457c638b3b08ab4e69ee567dd8b79/example/ui.gui_script#L346

  1. For the show() function you should use this message_id in the callback:
    https://github.com/AGulev/DefVideoAds/blob/abaeb8f6902457c638b3b08ab4e69ee567dd8b79/example/ui.gui_script#L94-L109

from defold-extension-unity-ads.

AGulev avatar AGulev commented on June 20, 2024

Also, you can take a look this ads_wrapper , maybe it will be easier for you.

from defold-extension-unity-ads.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.