-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Throws NullReferenceException when I try to invoke a function #401
Comments
Hi @cihadturhan , the |
Hey, that’s my bad when posting here. But the issue is same for both AppLovin callbacks cannot execute In my case, I converted function to static and called it directly instead of Invoke. So it’s resolved but this problem is still there |
@cihadturhan Yeah most of the callbacks are called in background threads unless you specify otherwise. Could you try setting |
Wow is there such a variable? Is there any drawbacks of running events on the main thread (ie freezing the ui or network requests)? |
It would have the same drawbacks as putting the event in a Unity event function like Start() or Update(). Depending on the code in the callback there could be differences in performance, but for most cases there would likely be no difference. |
Hi Jonathan, kinda related to this issue so I wanted to ask here. Example: googleads/googleads-mobile-unity#2854 (comment) I wonder when I add |
|
Thanks for the response. I'm trying it now. I'm guessing it should be set before initialization of the SDK? |
It is best to set it prior to initialization, otherwise the |
MAX Plugin Version
6.5.2
Unity Version
2022.3.22f1
Device/Platform Info
Android 10 - 11
Current Behavior
The code snippet below throws
NullReferenceException
when the it fails to load a rewarded ad.Expected Behavior
I'd expect
Invoke
function to be called without issues but it throwsNullReferenceException
for the called function name.How to Reproduce
OnLoad
after it's initializedAdditional Info
No response
The text was updated successfully, but these errors were encountered: