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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

iTween Visual Editor

Discussion in 'Made With Unity' started by dkoontz, Oct 27, 2010.

  1. dkoontz

    dkoontz

    Joined:
    Aug 7, 2009
    Posts:
    198
    Yes, if you're going to be changing options in code then it's far easier to just call iTween directly and pass in your parameters. The only programatic access the visual editor really gives you is to get an iTweenEvent, to start the tween, and to stop it. In theory what you're asking for is doable, but the editor goes through quite a few hoops to make it work so it is non-trivial.
     
  2. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    How to use it with prefabs?

    iTweenEvent.GetEvent(transform.gameObject, "showcard").Play ();

    I'm trying this code but it only works on some of my instantiated prefabs, not on all. What am i doing wrong?
     
  3. dkoontz

    dkoontz

    Joined:
    Aug 7, 2009
    Posts:
    198
    Are you getting an error or any sort of message? Also, are you sure that you are doing this on an instance and not the prefab itself? The syntax is correct and there aren't really any gotchas with what you're doing here other than the prefab vs instance.
     
  4. mrekuc

    mrekuc

    Joined:
    Apr 17, 2009
    Posts:
    116
    Any idea why after adding nodes to the paths, even if I save it will always put the path spline back the way it was before. Then randomly after numerous tries just saves the path waypoints to correctly go where I want them to go?

    [FIXED] Unity is stupid with these paths after a bit of working them and starts not saving them correctly on save. Reboot of Unity and it works fine again.
     
    Last edited: Sep 25, 2013
  5. dkoontz

    dkoontz

    Joined:
    Aug 7, 2009
    Posts:
    198
    The path editor is a separate project that Bob (the author of iTween) maintains. I would post your issue on the path editor thread or maybe on his site.
     
  6. Shaba1

    Shaba1

    Joined:
    Jan 21, 2010
    Posts:
    63
    I get this error after importing from the Asset store even before I run the editor.

    Assets/iTweenEditor/iTween.cs(46,14): error CS0101: The namespace `global::' already contains a definition for `iTween'
     
  7. dkoontz

    dkoontz

    Joined:
    Aug 7, 2009
    Posts:
    198
    Do you already have iTween? The visual editor includes a copy since it cannot function without it. Just remove the iTween.cs that was included with the visual editor.
     
  8. Shaba1

    Shaba1

    Joined:
    Jan 21, 2010
    Posts:
    63
    Yes I already had itweens installed I just removed that file and the error disappeared. Thanks for the help. More questions will be forthcoming just to warn you. :)
     
  9. AdeelAbbas

    AdeelAbbas

    Joined:
    Jul 18, 2014
    Posts:
    22
    Hi everyone I have issue when I used itween path it stucks or become slow. I used it for 3d runner game. Any suggestions.
     
  10. roby-zuniga

    roby-zuniga

    Joined:
    Mar 17, 2013
    Posts:
    5
    Hello, i was wondering if anyone can help me. I've figured out how to move the object along a curve. I would like be able to add the curve to a prefab. However, when i do the curve stays in the at the original place where i created it. What i mean is that i would like each of the curve's points to be relative to the location of the parent object when spawned. thanks anyone for any help you might be able to provide!
     
    Last edited: Aug 30, 2015