Skip to content
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

UpdateBannerPosition does not update X position if initially created at BannerPosition.BottomCenter #429

Open
v-ramanouskaya opened this issue Sep 24, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@v-ramanouskaya
Copy link

MAX Plugin Version

6.5.0

Unity Version

2022.3.34f1

Device/Platform Info

all devices

Current Behavior

If the banner initially created with a pivot for positioning MaxSdk.CreateBanner(adUnitId,BannerAdUnitId,MaxSdkBase.BannerPosition.BottomCenter);
following MaxSdk.UpdateBannerPosition(adUnitId, bannerXPosition, bannerYPosition); does not update X position, and always sets the banner at the left corner of the screen.

Expected Behavior

MaxSdk.UpdateBannerPosition(adUnitId, bannerXPosition, bannerYPosition); updates both x and y position correctly

How to Reproduce

Follow the steps in the description

Reproducible in the demo app?

Not Tested

Additional Info

No response

@v-ramanouskaya v-ramanouskaya added the bug Something isn't working label Sep 24, 2024
@santoshbagadi
Copy link
Contributor

@v-ramanouskaya BottomCenter and TopCenter positions set the banner to full width, which could be causing the issue. Can you try using the CreateBanner(string adUnitIdentifier, float x, float y) API when creating the banner to avoid this issue.

We'll include a fix to update to default width when banner position is updated in a later release.

@v-ramanouskaya
Copy link
Author

@v-ramanouskaya BottomCenter and TopCenter positions set the banner to full width, which could be causing the issue. Can you try using the CreateBanner(string adUnitIdentifier, float x, float y) API when creating the banner to avoid this issue.

We'll include a fix to update to default width when banner position is updated in a later release.

Thank you for your reply. We are using remote config to set up our banner position (switch between custom position and pre-defined pivot position), so If the banner was initially created using the pivot, we can not switch it to using custom position correctly.

Another thing, is if we try to Re-create the banner (Destroy -> Create Banner) when the new config received, the Ads seem to not Load, since we stop receiving OnAdLoadedEvent callback.

@JonathanLiuApp
Copy link
Contributor

Hi @v-ramanouskaya I wasn't able to reproduce your issue.

I followed the steps and did

        MaxSdk.CreateBanner(BANNER_AD_UNIT_ID, MaxSdkBase.BannerPosition.BottomCenter);
        MaxSdk.UpdateBannerPosition(adUnitId, 300, 0)

and was able to successfully update the banner position.

I did notice that in your description you used
MaxSdk.CreateBanner(adUnitId,BannerAdUnitId,MaxSdkBase.BannerPosition.BottomCenter);
Could you check and make sure you are calling CreateBanner with only two arguments when you are creating a banner with a pivot? Using three arguments creates a banner with a set x and y position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants