AppLovin / AppLovin-MAX-Unity-Plugin

127 stars 35 forks source link

Main Thread Callbacks don't fire in Unity Editor #353

Closed actopolus closed 7 months ago

actopolus commented 7 months ago

MAX Plugin Version

6.4.1, 6.4.2

Unity Version

Any

Device/Platform Info

Unity Editor

Current Behavior

Ads callbacks that are routed through main thread don't fire in Unity Editor, but are working in build.

Expected Behavior

Ads callbacks are working in Unity Editor for testing purposes.

How to Reproduce

  1. Use described versions
  2. Listen callback OnAdHiddenEvent
  3. Invoke ShowRewardedAd or ShowInerstitialAd
  4. You will see logs about events but nothing will happens

Additional Info

There is logical error in the code, which creates MaxExecutor. Creation of MaxExecutor is placed between #if !UNITY_EDITOR and #endif.

You should clarify documentation that users of SDK rquired to invoke MaxEventExecutor.InitializeIfNeeded by self. Or just put this invokation in another place.

JonathanLiuApp commented 7 months ago

@actopolus Thank you for bringing this to our attention. For now please call MaxEventExecutor.InitializeIfNeeded(). We are working on a fix and will update here when it is live.

JonathanLiuApp commented 7 months ago

We've released a fix for this in the latest version of our plugin (6.4.3).