- Home /
Detecting Addblockers in Unity
In Unity is there a way to detect if the game player is using an addblocker? The goal is to either have the user disable the addblocker or restrict the game play.
Jason
Answer by phil_me_up · Mar 03, 2016 at 01:10 AM
I assume you're talking about WebPlayer / WebGL games here.
I believe that Ad Blocker Detection works by checking (client side) for any modification of the webpage (i.e. modification to CSS etc). Unity does allow for browser -> game communication:
http://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html
http://docs.unity3d.com/Manual/UnityWebPlayerandbrowsercommunication.html
It may be possible for you to create a bit of JavaScript which will detect the ad blockers and feed that information back in. A possible starting point: http://www.hongkiat.com/blog/jquery-detect-ads-block/
What about Android and other mobile platforms. Is there a way to check for adblockers on these in Unity as well?
Jason