Search Unity

WebGL and eval()

Discussion in 'Scripting' started by dansav, Mar 2, 2015.

  1. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    510
    Will WebGL support eval(). I was reading that the unity code will be converted to javascript and javascript does support eval.

    Can the javascript that I write on an html page be aware or see any javascript variables in unity? Or would I have to use the standard SendMessage and ExternalEval to communicate back and forth.
     
  2. sokki

    sokki

    Joined:
    Jan 31, 2015
    Posts:
    166
    off-topic, have you made any Webgl game by far?
     
  3. ornicar

    ornicar

    Joined:
    Mar 17, 2015
    Posts:
    6
    As far as I understand, eval() is not supported by Unity WebGL build.

    Applicaton.ExternalEval() is supported but the evaluated code does not have access to variables inside Unity. Or at least I don't know how to.