Search Unity

DOTween (HOTween v2) compatibility test

Discussion in 'Works In Progress - Archive' started by Demigiant, Aug 1, 2014.

  1. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Wohooo that is awesome, about the HTML5 exporter! It's great that they changed their initial decision!

    About Flash, personally I never cared about what Steve Jobs said. I was angry at Adobe since before the Apple incident happened but still stood by Flash after that, hoping Adobe would finally realize that they were doing horrible things with the software and its developers/customers and change things for the better. That didn't happen so I finally gave up, even if I still use it for some jobs sometimes :/
     
  2. joe90

    joe90

    Joined:
    May 16, 2014
    Posts:
    12
    Im new to this stuff, but I cannot see the editor after importing, I have no new elements in the 'Windows' menu, the same happens on HOTween? Any ideas, apart from that it works fine.

    Thanks
     
  3. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Hi. DOTween doesn't have (yet) a visual editor. With HOTween instead, you have to download it separately.
     
  4. joe90

    joe90

    Joined:
    May 16, 2014
    Posts:
    12
    Ahh ok.. so what is the 'Editor' directory that comes in the unity file from the website? If I download HOTween v1.3.355 (.zip) it comes with a 'Editor Directory'? I assumed that added an option in the menu 'Window'?

    Thanks for the quick response.
     
  5. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    "Editor" is one of the special folders Unity requires, which allows me to place scripts there that can show additional information about tweens when you select the HOTween object while running.
     
  6. joe90

    joe90

    Joined:
    May 16, 2014
    Posts:
    12
    Ahh thank you.. that makes sense. now.
     
  7. fermmmm

    fermmmm

    Joined:
    Oct 18, 2013
    Posts:
    129
    This week a Unity 5 close beta has started , I'm going to get a copy of it and test DOTween with the WebGL exporter, I'll keep you updated.
     
  8. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Great! Thank you @fermmmm :)

    P.S. I suppose it will have issues due to the language (and not the functions) being not correctly implemented in the export (since I'm using generics and we learned that Unity keeps correct generic implementation for later), but crossing my fingers and I'll definitely work on it
     
  9. fermmmm

    fermmmm

    Joined:
    Oct 18, 2013
    Posts:
    129
    I have Unity 5 beta 1, tested DoTween and works in the editor, but when I export with the Webgl target gives errors in the console and does not export anything. I sent you a private message.

    Edit:
    Leantween works http://www.punqui.com/temp/webgl3/
     
    Last edited: Aug 23, 2014
  10. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    I should be able to fix it without problems, though it's probably just due to WebGL export still being in pre-alpha and thus not all language features being implemented. I'm pretty sure DOTween returns errors right now because of the way it uses generics, but I'm also sure Unity will implement generics correctly since it's a basic feature
     
  11. fermmmm

    fermmmm

    Joined:
    Oct 18, 2013
    Posts:
    129
  12. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Very cool that you are working on a new improved V2. Kudos.

    WebGL support is great, Flash would also be awesome (LeanTween works on flash). Reason is that not everyone will be jumping on Unity5 bandwagon right away. Sure will be lots of bugs. Probably like Unity 3.57 and 4, there will be the Unity 4 users and Unity 5 users. Even though flash is "Dead" to unity, but as we can see on the Web, Flash is still everywhere and not likely to die anytime soon.
     
  13. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    I'm indeed trying to make DOTween compatible with Flash, but first I want to finish implementing all the core functions so I won't have to do it twice. The reason DOTween is not currently Flash compatible is actually a Unity bug, where extension methods don't work correctly if the first parameter is a generic T (or even if there is a "where" using generics). Sadly Unity not supporting Flash anymore means that bug won't be solved, so I'll have to write tons of overloads instead than using generics, sigh.

    By the way, I'm not a Unity Flash user (even if I used Flash for ages, and still sometimes use it for some job), but if you are, I was wondering if there is really no way to ask Unity to fix a Flash bug?

    P.S. WebGL compatibility will happen 100%. I'm just waiting to see what will really be supported when Unity 5 will be out (again, the problem right now are extension methods, a bug which Unity should solve since they even have tutorials on how to use them).
     
  14. fermmmm

    fermmmm

    Joined:
    Oct 18, 2013
    Posts:
    129
    Demigiant likes this.
  15. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    @fermmmm That is great! Thanks a lot for the help :)
     
  16. fermmmm

    fermmmm

    Joined:
    Oct 18, 2013
    Posts:
    129
    They fixed the issue, Ralph from unity said:

    We found the issue.
    The problem was we were not respecting the constraint on the genericparameter of SetLoop (and others for the tween extensions). That is fixed. However, we missed the cutoff for the next beta, so it will be in a future beta.

    In the meantime you can work around this, by taking out the constraint and casting inside the method instead.


    He responded a thread I've started about the issue:
    http://forum.unity3d.com/threads/dotween-library-not-working-with-webgl.276481/#post-1827912

    So probably beta 12 will support DoTween.
     
  17. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Fantastic. That means they're fixing extension methods constraints all over the place, which will make everything compatible! Thanks again :)
     
  18. fermmmm

    fermmmm

    Joined:
    Oct 18, 2013
    Posts:
    129
    Last edited: Nov 19, 2014
  19. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Wohooooo!!!! I applaude your efforts and rejoice! Thanks a lot @fermmmm! I am seeing it right now :)
     
  20. bkachmar

    bkachmar

    Joined:
    Mar 15, 2013
    Posts:
    43
    How to tween a float from 0 to 1 during 2 seconds?
     
  21. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Code (CSharp):
    1. DOVirtual.Float(0, 1, 2, OnMyFloatUpdate);
    2. private void OnMyFloatUpdate(float value)
    3. {
    4.     // do whatever you like with changing value
    5. }
    6.  
     
  22. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Or alternatively, if you want the value to change automatically:
    Code (csharp):
    1. myFloat = 0;
    2. DOTween.To(()=>myFloat, x=>myFloat=x, 1, 2);
    :p
     
    codestage likes this.
  23. bkachmar

    bkachmar

    Joined:
    Mar 15, 2013
    Posts:
    43
    Thanks, guys.
    Do you know if I can add a callback with parameter?
    Something like this:
    MySequence.AppendCallback(OnMySequence(12.0f))
    or
    MySequence.AppendCallback(OnMySequence, 12.0f)
     
  24. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    You will need to use a lambda for that:
    Code (csharp):
    1. MySequence.AppendCallback(()=>OnMySequence(12.0f));
     
  25. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
  26. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    I'm on a roll today :D
     
  27. juicybeast

    juicybeast

    Joined:
    Nov 12, 2014
    Posts:
    32
    Hi, just passing by to say I tested on Xbox One, the test shows the logo and everything moves, I guess it works then.
     
  28. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Thank you very much, that is great news! :)