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
↧