-
Notifications
You must be signed in to change notification settings - Fork 3
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
[HB-6514 ] Include API to Allow Resizing of Gameobject Banner Based on Adaptive Banner Size #171
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…-unity' into adaptive-banner-resize
…hartboost-mediation-ad-size-to-be-used-as-struct-and-use-an-enum-for-name-field
…hartboost-mediation-ad-size-to-be-used-as-struct-and-use-an-enum-for-name-field
…d-as-struct-and-use-an-enum-for-name-field' into adaptive-banner-resize # Conflicts: # com.chartboost.mediation.demo/Assets/Demo/Demo.cs # com.chartboost.mediation/Android~/chartboost-mediation-android-bridge/src/main/java/com/chartboost/mediation/unity/BannerAdWrapper.kt # com.chartboost.mediation/Android~/chartboost-mediation-android-bridge/src/main/java/com/chartboost/mediation/unity/BannerLayout.kt # com.chartboost.mediation/Android~/chartboost-mediation-android-bridge/src/main/java/com/chartboost/mediation/unity/UnityBridge.kt # com.chartboost.mediation/Editor/ChartboostMediationUnityBannerAdEditor.cs # com.chartboost.mediation/Runtime/AdFormats/Banner/ChartboostMediationBannerViewAndroid.cs # com.chartboost.mediation/Runtime/AdFormats/Banner/Unity/ChartboostMediationUnityBannerAd.Creator.cs # com.chartboost.mediation/Runtime/AdFormats/Banner/Unity/ChartboostMediationUnityBannerAd.cs
…d-as-struct-and-use-an-enum-for-name-field' into adaptive-banner-resize
…size # Conflicts: # com.chartboost.mediation/Android~/chartboost-mediation-android-bridge/src/main/java/com/chartboost/mediation/unity/BannerAdWrapper.kt # com.chartboost.mediation/Editor/ChartboostMediationUnityBannerAdEditor.cs # com.chartboost.mediation/Runtime/AdFormats/Banner/Unity/ChartboostMediationUnityBannerAd.cs # com.chartboost.mediation/Runtime/Banner/ChartboostMediationBannerAdSize.cs # com.chartboost.mediation/Runtime/Plugins/iOS/ChartboostMediationUnityBridge.mm
kushG
requested review from
SCastanedaMunoz,
cb-jpadilla and
CB-RyanMcCormick
September 21, 2023 19:19
cb-jpadilla
reviewed
Sep 21, 2023
cb-jpadilla
reviewed
Sep 21, 2023
...ost-mediation-android-bridge/src/main/java/com/chartboost/mediation/unity/BannerAdWrapper.kt
Show resolved
Hide resolved
cb-jpadilla
reviewed
Sep 21, 2023
com.chartboost.mediation/Runtime/Banner/ChartboostMediationBannerAdSize.cs
Outdated
Show resolved
Hide resolved
cb-jpadilla
reviewed
Sep 21, 2023
com.chartboost.mediation/Runtime/AdFormats/Banner/Unity/ChartboostMediationUnityBannerAd.cs
Outdated
Show resolved
Hide resolved
cb-jpadilla
reviewed
Sep 21, 2023
com.chartboost.mediation/Runtime/AdFormats/Banner/Unity/ChartboostMediationUnityBannerAd.cs
Outdated
Show resolved
Hide resolved
cb-jpadilla
reviewed
Sep 21, 2023
com.chartboost.mediation/Runtime/AdFormats/Banner/Unity/ChartboostMediationUnityBannerAd.cs
Outdated
Show resolved
Hide resolved
cb-jpadilla
reviewed
Sep 21, 2023
...tboost-mediation-android-bridge/src/main/java/com/chartboost/mediation/unity/BannerLayout.kt
Show resolved
Hide resolved
cb-jpadilla
reviewed
Sep 21, 2023
...ost-mediation-android-bridge/src/main/java/com/chartboost/mediation/unity/BannerAdWrapper.kt
Outdated
Show resolved
Hide resolved
cb-jpadilla
reviewed
Sep 21, 2023
com.chartboost.mediation/Runtime/AdFormats/Banner/ChartboostMediationBannerViewAndroid.cs
Show resolved
Hide resolved
cb-jpadilla
reviewed
Sep 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments.
cb-jpadilla
reviewed
Sep 22, 2023
cb-jpadilla
approved these changes
Sep 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️ I can't provide more feedback for the iOS side.
SCastanedaMunoz
added
enhancement
New feature or request
api refactoring
API refactoring features or changes
labels
Sep 26, 2023
kushG
added a commit
that referenced
this pull request
Oct 12, 2023
* ios updated to use adaptive banners * WIP banner work for 5.0 * Fixed banner load working on ios * android updates * android updates * more android update * banner keywords iOS WIP * ios keywords fix * renaming variables * android updates * working android code for fixed banners * keeping old API unchanged * code for onAdRefreshed added * AdWrapper fix for deprecated APIs * android bridge updates * removing unwanted files from git * destroy added * size name made get only * working gameobject code for android for fixed banners * creator added * working android and ios e2e * onAdViewAdded added on android * minor changes * UnityBannerAdSize added * Editor code added * keys commit removed * added missing files * [HB-6464] Updating EDM to version 1.2.177 (#169) * added missing files * Banner drag fix * Update com.chartboost.mediation/Runtime/Platforms/IOS/ChartboostMediationIOS.Callbacks.cs Co-authored-by: Kendall <[email protected]> Signed-off-by: kushG <[email protected]> * default case added in size names for ios * using screen width for adaptive banners width * WrapperStore added in iOS * Update build.gradle Signed-off-by: kushG <[email protected]> * fix for horizontal and vertical alignment on android * Apply suggestions from code review Co-authored-by: Ray Graham <[email protected]> Signed-off-by: kushG <[email protected]> * formatting updates, minor changes based on review comments * more formatting changes * testing line end commit * Extra blank lines at the end of file on android code in Rider * Update com.chartboost.mediation/Runtime/AdFormats/Banner/Unity/ChartboostMediationUnityBannerAd.Creator.cs Co-authored-by: Santiago Castaneda Munoz <[email protected]> Signed-off-by: kushG <[email protected]> * Apply suggestions from code review Co-authored-by: Santiago Castaneda Munoz <[email protected]> Signed-off-by: kushG <[email protected]> * few more updated based on review comments * not destroying bannerAd in demo's OnDestroy * Fixes missing/extra EOL * removed double code of setting banner ad to visible * minor fix in gameobject naming * finding canvas made better * WillAppear changed to DidLoad * [HB-6495] Refactor ChartboostMediationBannerAdSize to be used as Struct and use Enum for Name Field (#170) * size refactor * ChartboostMediationBannerAdSize changed from class to struct * ChartboostMediationBannerName renamed to ChartboostMediationBannerSizeType * minor rename * [HB-6514 ] Include API to Allow Resizing of Gameobject Banner Based on Adaptive Banner Size (#171) * resize API added * removed #UNITY_ANDROID * WrapperStore added in iOS * resize working on iOS * banner request container removed in iOS * android WIP * working logic for resize and drag on android * fix for horizontal and vertical alignment on android * size refactor * ChartboostMediationBannerAdSize changed from class to struct * ChartboostMediationBannerName renamed to ChartboostMediationBannerSizeType * merge fixes * minor rename * working resize and drag on android * working ios code for resize and drag * DiscardOversizedAds added * removed debug code * fixes for null/default values and removed some debug code * default state of banner drag set ot false * default state of resize set to "FitBoth" * missing EOL * autoLoadOnInit removed * default set to AllNetworkBanner in demo * renaming some enum options * disable test mode * Added Missing Meta Files (#172) * [HB-6516] Create a Separate Size Object for Newer Banner API Instead of Updating the Size from Deprecated API (#173) * rename ChartboostMediationBannerAdSize to ChartboostMediationBannerSize * base file didn't get pushed * missing android update for sizeType enum of ChartboostMediationBannerSize (#174) * Updating Dependencies and Package Information (#175) * Remove UnityBannerAd Creation Option from Chartboost Mediation MenuItem (#176) * Fix For Load With (X, Y) on Unsupported BannerView (#177) * [HB-6453] Mark `ChartboostMediationBannerAd` API as Deprecated (#178) * [HB-6572] Always Keep the BannerAd within the Safe Area (#179) * [HB- 6580] Fix Resize when `ChartboostMediationBannerView` API is in Use (#180) * Logger.LogError should use Debug.LogError (#181) * Trigger DidStart on ChartboostMediationUnsupported (#182) * [HB-6597] Adaptive Banner Fixes (#183) * Fix for crash on ad reset (#184) Signed-off-by: kushG <[email protected]> * Update CHANGELOG.md (#185) Signed-off-by: kushG <[email protected]> * [HB-6599] Adds a `MoveTo` internal API call to sync UnityBannerAd Gameobject position with Native View (#186) * moveTo added, canvas replaced with parent transform during unitybannerAd create * demo fix * [HB-5971]Update the Readme with Instructions and Sample code for Using the Adaptive Banner 3D game object (#187) * IChartboostMediationBannerView.cs updated * all the remaining documentation * Update loading-ads.md Signed-off-by: kushG <[email protected]> --------- Signed-off-by: kushG <[email protected]> * minor fix with canvas scale Signed-off-by: kushG <[email protected]> * [HB-5971] Update loading-ads.md to Include More Details On Adaptive Banners (#188) * Update loading-ads.md Signed-off-by: kushG <[email protected]> * fixed links Signed-off-by: kushG <[email protected]> * Update loading-ads.md Signed-off-by: kushG <[email protected]> * Update loading-ads.md Signed-off-by: kushG <[email protected]> --------- Signed-off-by: kushG <[email protected]> --------- Signed-off-by: kushG <[email protected]> Co-authored-by: Santiago Castaneda Munoz <[email protected]> Co-authored-by: Kendall <[email protected]> Co-authored-by: Ray Graham <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Gameobject in Unity can be resized easily based on the size of the ad we get from an adaptive banner placement.
However, the creatives are loaded on a native view (through native sdk) and Unity can only change the size of the gameobject but not the native view. To change the size of native view we would need an explicit call from Unity to resize the corresponding native view.
This PR adds the necessary API to resize the gameobject and native view simultaneously