Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

WebGL: iTween breaks, but only when not in development build?

Discussion in 'Unity 5 Pre-order Beta' started by Doddler, Oct 27, 2014.

  1. Doddler

    Doddler

    Joined:
    Jul 12, 2011
    Posts:
    269
    I was playing around with trying to get an existing project to work in webGL, and found that when I attempt to tween an object, the webGL player locks up in what looks like an infinite loop of some kind. I haven't dived into the iTween code, but this is what starts the mess:


    (The second Debug.Log is never reached)

    Now, normally I wouldn't sweat it, because honestly I expect some code to break in the webGL version, especially with it in beta. What peaked my attention is that after testing, iTween DOES work... but only when 'development build' is checked. It doesn't appear to be affected by any other options, optimization level, stripping mode, it will work when in development mode, but not when it's not set.

    I'm trying to track down the offending code to see if I can get a reproducible snippet to submit as a bug, but in the mean time, is it expected in any way that this kind of thing could occur? It seems really strange that it wouldn't work when doing a release build, and it does make it much harder to track down.
     
    root8888 likes this.
  2. Doddler

    Doddler

    Joined:
    Jul 12, 2011
    Posts:
    269
    I found it! A relatively innocent piece of code deep within itween:

    Code (csharp):
    1. return System.Guid.NewGuid().ToString();
    It seems that this call is broken only in release builds, but not in developer build. I'm putting in a ticket for it shortly.
     
  3. GabrieleUnity

    GabrieleUnity

    Unity Technologies

    Joined:
    Sep 4, 2012
    Posts:
    116
    Hello Doddler,

    there is an issue with the current build the prevents NewGuid (and a bunch of other methods) to work properly. The issue has been fixed and will be included in a coming beta build.