@@ -56,7 +56,7 @@ public void CreateBannerView(string adUnitId, AdSize adSize, AdPosition position
5656 {
5757 _adUnitId = adUnitId ;
5858
59- if ( adSize == AdSize . SmartBanner || adSize . AdType == AdSize . Type . AnchoredAdaptive )
59+ if ( adSize == AdSize . SmartBanner || adSize . AdType == AdSize . Type . AnchoredAdaptive || adSize . AdType == AdSize . Type . LargeAnchoredAdaptive )
6060 {
6161 SetAndStretchAd ( position , adSize ) ;
6262 }
@@ -75,7 +75,7 @@ public void CreateBannerView(string adUnitId, AdSize adSize, int x, int y)
7575 {
7676 _adUnitId = adUnitId ;
7777 RectTransform rect = GetRectTransform ( ) ;
78- if ( adSize == AdSize . SmartBanner || adSize . AdType == AdSize . Type . AnchoredAdaptive )
78+ if ( adSize == AdSize . SmartBanner || adSize . AdType == AdSize . Type . AnchoredAdaptive || adSize . AdType == AdSize . Type . LargeAnchoredAdaptive )
7979 {
8080 SetAndStretchAd ( 0 , adSize ) ;
8181 rect . anchoredPosition = new Vector3 ( 0 , y , 1 ) ;
@@ -93,7 +93,7 @@ bool CreateBannerView(AdSize adSize, AdPosition? position)
9393 {
9494 string prefabName ;
9595
96- if ( adSize == AdSize . SmartBanner || adSize . AdType == AdSize . Type . AnchoredAdaptive )
96+ if ( adSize == AdSize . SmartBanner || adSize . AdType == AdSize . Type . AnchoredAdaptive || adSize . AdType == AdSize . Type . LargeAnchoredAdaptive )
9797 {
9898 if ( position . HasValue && position . Value == AdPosition . Center )
9999 {
@@ -296,6 +296,23 @@ private void SetAndStretchAd(AdPosition pos, AdSize adSize)
296296
297297 rect . pivot = new Vector2 ( 0.5f , 0.5f ) ;
298298
299+ Text adText = _gameObject . GetComponentInChildren < Text > ( ) ;
300+ if ( adText != null )
301+ {
302+ if ( adSize . AdType == AdSize . Type . AnchoredAdaptive )
303+ {
304+ adText . text = "This is a Test Adaptive Banner" ;
305+ }
306+ else if ( adSize . AdType == AdSize . Type . LargeAnchoredAdaptive )
307+ {
308+ adText . text = "This is a Test Large Adaptive Banner" ;
309+ }
310+ else if ( adSize == AdSize . SmartBanner )
311+ {
312+ adText . text = "This is a Test Smart Banner" ;
313+ }
314+ }
315+
299316 if ( pos == AdPosition . Bottom || pos == AdPosition . BottomLeft || pos == AdPosition . BottomRight )
300317 {
301318 rect . SetInsetAndSizeFromParentEdge ( RectTransform . Edge . Bottom , 0 , rect . sizeDelta . y ) ;
@@ -308,21 +325,13 @@ private void SetAndStretchAd(AdPosition pos, AdSize adSize)
308325 }
309326 else if ( pos == AdPosition . Center )
310327 {
311- if ( adSize . AdType == AdSize . Type . AnchoredAdaptive )
312- {
313- Text adText = _gameObject . GetComponentInChildren < Text > ( ) ;
314- adText . text = "This is a Test Adaptive Banner" ;
315- }
316- else if ( adSize == AdSize . SmartBanner )
317- {
318- Text adText = _gameObject . GetComponentInChildren < Text > ( ) ;
319- adText . text = "This is a Test Smart Banner" ;
320- }
321- else
328+ if ( adSize . AdType != AdSize . Type . AnchoredAdaptive &&
329+ adSize . AdType != AdSize . Type . LargeAnchoredAdaptive &&
330+ adSize != AdSize . SmartBanner )
322331 {
323332 rect . anchoredPosition = new Vector2 ( 0 , 0 ) ;
324333 }
325- }
334+ }
326335 else
327336 {
328337 rect . anchoredPosition = rect . position ;
0 commit comments