Custom age gate from manual no longer works?

I'm using Unity ads with mediation.

The manual has an example for custom age gate: https://docs.unity.com/ads/en/manual/ImplementingCustomAgeGates

However it doesn't mention what version of Unity that works with, and it doesn't work with 2021.3.

The Advertisement.SetMetaData(ageGateMetaData); it appears Advertisement was under UnityEngine.Advertisement back in Unity 5, did they scrap it in newer versions without replacing it?

Is there a way to implement a custom age gate in 2021.3? I have an age gate in my app which confirms their age, as well as privacy settings prompt for GDRP.

The only way I can think of is to sign up for/manage 2 ads accounts, one with COPPA enabled and one without, and load the relevant account when they enter their age. Is that the best/only way?

[quote=“lmbarns”, post:1, topic: 911855]
I’m using Unity ads with mediation.

The manual has an example for custom age gate: https://docs.unity.com/ads/en/manual/ImplementingCustomAgeGates

However it doesn’t mention what version of Unity that works with, and it doesn’t work with 2021.3.

The Advertisement.SetMetaData(ageGateMetaData); it appears Advertisement was under UnityEngine.Advertisement back in Unity 5, did they scrap it in newer versions without replacing it?

Is there a way to implement a custom age gate in 2021.3? I have an age gate in my app which confirms their age, as well as privacy settings prompt for GDRP.

The only way I can think of is to sign up for/manage 2 ads accounts, one with COPPA enabled and one without, and load the relevant account when they enter their age. Is that the best/only way?
[/quote]
I just tested the 2021.3.0f and implemented a custom age gate, what is the specific error you are getting?

8872080--1211391--upload_2023-3-13_15-48-2.png

[quote=“SamOYUnity3D”, post:2, topic: 911855]
I just tested the 2021.3.0f and implemented a custom age gate, what is the specific error you are getting?
[/quote]

Thanks for verifying. Any chance you could share your using statements that worked?

For whatever reason it doesn’t work for me, if I add using UnityEngine.Advertisement; it accepts that using now but metadata “could not be found”.

I have ads with mediation installed.

8873148--1211760--upload_2023-3-13_14-33-9.png

8873148--1211763--upload_2023-3-13_14-34-1.png

8873148--1211652--upload_2023-3-13_9-17-29.png
8873148--1211655--upload_2023-3-13_9-23-18.png

[quote=“lmbarns”, post:3, topic: 911855]
Thanks for verifying. Any chance you could share your using statements that worked?

For whatever reason it doesn’t work for me, if I add using UnityEngine.Advertisement; it accepts that using now but metadata “could not be found”.

I have ads with mediation installed.

[/quote]
Here it is. I think something might be wrong when importing the package, how about reimporting the package or creating a new project?
8874414--1211850--upload_2023-3-14_11-28-45.png

[quote=“SamOYUnity3D”, post:4, topic: 911855]
Here it is. I think something might be wrong when importing the package, how about reimporting the package or creating a new project?

[/quote]

Any idea why it doesn’t work on mine with that exact same code? Notice the screenshots I put, it’s red and can’t compile even though it has the same using statement as you?

Do you have Ads with Mediation installed or legacy ads? I have the latest ads with mediation installed and it doesn’t work.

Sounds like you are using Unity Mediation, but the manual you mentioned is for legacy ads, you can install the legacy ads SDK or use Unity LevePlay mediation(https://www.is.com/mediation/).