0

I try to add image element in canvas like ad banner.

string injection = @"$(""<div id=""UpperBanner""><img src=""http://mydomain.com/adbanner.png""></div>"").insertbefore(""#unityPlayerEmbed"");";

Application.ExternalEval(injection);

but, it doesn't work.

there are no image in canvas.

any ideas?

taehunhan
  • 1
  • 1

1 Answers1

0

After unquoting, your string comes out to

$("<div id="UpperBanner"><img src="http://mydomain.com/adbanner.png"></div>").insertbefore("#unityPlayerEmbed");

The syntax-highlighting should help you see the issue with that :)

BlueRaja - Danny Pflughoeft
  • 84,206
  • 33
  • 197
  • 283