Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Trouble Building to WebGL - IL2CPP compile failed.

Discussion in 'Unity 5 Pre-order Beta' started by ssawyer, Oct 28, 2014.

  1. ssawyer

    ssawyer

    Joined:
    Sep 15, 2014
    Posts:
    4
    I'm trying to convert one of our projects over to the new WebGL builds and I can't seem to get past this compile fail.

    What would be potential causes for IL2CPP to fail to compile?

    We are using System.Reflection but not System.Reflection.Emit. Do we need to remove all use of System.Reflection in the codebase?

    Here's what I get in my console when I try to build:
    upload_2014-10-28_16-12-21.png
     
  2. RalphH

    RalphH

    Unity Technologies

    Joined:
    Dec 22, 2011
    Posts:
    592
    Reflection should just work. System.Reflection.Emit will not work (and never will). Please file a bug.
     
  3. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Ralph, not all reflection works I don't believe. But, out of curiosity, I'm looking into getting WebGL support working with my Json .Net asset... in terms of compilation and execution, would WebGL be most similar to iOS? For instance, if I compile as if I were targeting iOS reflection support will I be close to functional?
     
  4. RalphH

    RalphH

    Unity Technologies

    Joined:
    Dec 22, 2011
    Posts:
    592
    Yes, iOS AOT and IL2CPP would have similar restrictions.