IFrame Integration

Hi there,

My client would like an Iframe integrated into his game so that when one of his users click on an in-game link it will show them his website. The reason he wants it like this is so he can avoid users who use Ad-Blockers.

My question is, what would be the best way to integrate this. I am not looking for someone to code this as i am more than capable, i just can’t find enough information on this topic other than Iframe into websites.

Cheers for any response.

IFRAME is an element of HTML, so it can be displayed inside HTML content only. What you want is displaying a HTML page inside Unity game. And I assume you’re talking about a game running in a Web Player.

Theoretically you could do this - you can retrieve web page content using WWW class or some .NET classes, but the problem is rendering it. I don’t mean rendering on texture, but rendering raw HTML to display as a web page. I can imagine doing it on standalone, where you can use some existing libraries, but targeting web could be a lot harder. You can take a look at some solutions, e.g. from this question, but I think none of them works for web.

As a side note - when users have ad blocking enabled, then I believe they don’t want ads to be shown. Forcing them to visit a webpage is a good way to lose them.