Quantcast
Channel: Questions in topic: "ads"
Viewing all articles
Browse latest Browse all 1416

Callback help...cuz it's hard

$
0
0
I'm trying to integrate with an ad service. They provide a callback class I can use to determine when a video has ended/completed/etc. However the class is not monobehavior, instead it is AndroidJavaProxy. This causes me problems because I can't access any of my scripts from here. I'm not sure how to receive a value back letting me know what the callback script has actually done. The basics are like so: In my class I set up the call back like this: SomeAdService.setVideoCallbacks(newSomeAdServiceVideoCallbacks()); SomeAdService.Show(SomeAdService.Video) ////////////////////////////////////////////////// //SomeAdServiceVideoCallbacks script below /////////////////////////////////// using UnityEngine; using System; public class SomeAdServiceVideoCallbacks : AndroidJavaProxy { public SomeAdServiceVideoCallbacks() : base("com.SomeAdService.ads.VideoCallbacks") { } void onVideoFinished() { //stuff happens here but now do I send a value back to my calling script } } I have 0 experience with delegates, callbacks, lamdas, kung fu, etc and looking over the interwebs has just left me more confused. How can I get my class to read the results of the callback? Appreciate any help Thanks

Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>