Search Unity

HOTween: a fast and powerful Unity tween engine

Discussion in 'Assets and Asset Store' started by Izitmee, Jan 7, 2012.

  1. Little-Big-Monkey

    Little-Big-Monkey

    Joined:
    Mar 4, 2014
    Posts:
    35
    Hello,

    First of all, I would like to thank you for HOTween ! It's really usefull and have a lot more option than other tween library.
    But I think I found an little issue :

    - I set a tween in the editor component as From. (For exemple to tween scale from 0 to 1)
    - I set the Delay (Any delay, for exemple 2 sec)
    - When the tween play in autoplay, it works correctly : Set scale to 0, wait 2 sec, tween to 1
    - Now I disable the autoplay and launch the same tween by code with HOTween.Play("stringid"), It works incorrectly : wait 2 sec, set scale to 0 and tween to 1

    Can you check that plz ?

    By the way I also have some suggestion to improve HOTween functionnality :

    - The absolute default ease type must be linear without the need to set it.
    - By code the most used option in tween is EaseType and Delay. You should add some convenience overload to To and From method to set them without the need to use TweenParams.
    - In code, you should add some extension methods to Transform to tween directly the most used properties (position, rotation, scale) (For exemple : transform.localPositonTo(value, duration, delay, easeType), transform.localPositionFrom(...), ...)
    - You should use the standard naming guideline for you parameters, it would be more readable. (Just a personnal preference)

    Thank you for your time ;-)
     
  2. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    Hi LBM :)

    Mhmm that indeed looks like a bug, I'll check it out tomorrow.

    I was used to tween engines that use quad easeOut as default, and I find it's the most useful (or at least the one I prefer). Still, you can change the default easeType with HOTween.defEaseType.

    I actually never use delays in my code :D But you're right, I'll take a note and do that

    I have prototyped (since a long time) a new version of HOTween which is heavily based on extension methods. But for this one, I preferred to implement only things that were available both to C# and UnityScript (which lacks extension methods)

    Ah, that's a sore spot. For a series of reason, the coding style of HOTween doesn't make me happy at all. Though I still agree with the naming guidelines I used (at least for the public API). I thought a lot about that, but finally I chose to use Unity's naming guidelines, instead than standard C# ones. I believe it makes much more sense, since it's pure Unity-related stuff :p

    EDIT: About parameter naming though, I completely agree with you. I am so not happy about the naming convention I used there
     
  3. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    239
  4. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,193
    I was wondering is there a way to get all the Tweens currently running in the scene?

    On game pause I need to pause all Tweens, then on resume, I need to resume all Tweens. This normally wouldn't be a problem except for when sometimes Tweens will be paused in-game already (Switch that deactivates a turret). So I need to know their state before I pause, so when I unpause the game, I don't accidentally unpause a Tween that should stay paused.
     
  5. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    @zKici: I am too busy with HOTween modifications to check out HOPath, but if no one answers, you could try contacting Vevusio (HOPath's author) directly, here on the forums. Otherwise, for a small price, you could get Baroni's Simple Waypoint System, which is a more advanced (and very well tested/supported) path management (and uses HOTween too).

    @Ben BearFish: I never thought of such a usage. Currently, that can't be done, but it would be supereasy to implement, so I'll try to do it tomorrow.
     
    Last edited: Mar 5, 2014
  6. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,331
    I have a sequence of 4 tweens and would like to add a 5th tween while the animation is playing.

    What would be the best way to do this?
     
  7. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    Sorry rocki, but once you create and start a Sequence it's locked and you can't add another tween. A possible hack, if the 5th tween will always have the same duration, would be to add an interval of the same duration at the end of the Sequence. Then you just create another separate tween with a delay, that makes it start when the Sequence is complete except for the interval.
     
  8. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    @Ben Bearfish: didn't find the time to do it today. Hopefully tomorrow :p
     
  9. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,193
    Was just about to ask that, you mush have psychic powers. Thanks for the update.
     
  10. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    239
    Thanks for the response greatly appreciated, I will not bother you further for that :)

    However, I did fix 2 warnings that normally came up, but these 2 I simply searched and could not find a solution:

    Editor/HOTweenEditor.cs(52,15): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

    /Editor/HOTweenEditor.cs(230,14): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'


    can you please let me know if there is a fix on this??

    thanks
     
    Last edited: Mar 6, 2014
  11. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    @zKici: you should simply ignore those warnings. They happen because HOTween Visual Editor uses an old API for the undo system, but I can't update because otherwise it would break compatibility with older Unity versions :p

    @Ben BearFish: I'm almost on it :)
     
  12. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    New HOTween Update: v1.2.030

    New features:
    - Added overloads to HOTween.To/From that accept easeType and delay parameters inline
    - Added GetAllTweens, GetAllPausedTweens and GetAllPlayingTweens static HOTween methods

    As usual, last version can be downloaded from the website.

    @Ben Bearfish, @Little Big Monkey: these are the features you asked for ;)
     
  13. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    @npruehs: I checked that error you were having, and I indeed am using a system which recognizes the correct DLL. Can you write me the exact line your co-worker changed, and how it looks now (I think I know what you meant with what you wrote me, but I'm not sure)?
     
  14. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,193
    Grazie mille.
     
  15. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,193
    I seem to be getting an error in play mode when I call the GetAllPlayingTweens method in my code. Is this due to there being no HOTweens or something else? Is there a way to check for the null?

    Edit:
    It seems this happens if the scene does not have any active HOTweens in it. I have a turret that uses a HOTween, and when that's in the scene the error does not occur. If I disable that gameobject, then the error occurs, which probably means the error occurs if there are no HOTweens. So, indeed I'd need a way to check for null. Using

    Code (csharp):
    1. if (HOTween.GetAllPlayingTweens () == null)
    Still gives the error, which makes me believe HOTween itself is null, even though I call HOTween.Init () beforehand.

    I'm using the HoTweenMicro library.
     
    Last edited: Mar 6, 2014
  16. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    239
    Instead of ignoring them I'd like to make them disappear.. lol, is there a quickfix you can share with us for the new Unity version users lol.

    It sucks that everything is great except those 2 warnings always come up, and I have many assets included...

    Thanks
     
  17. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    @Ben Bearfish: ouch! I didn't test it in a no-tween situation. Definitely that's the issue. I'm on it :p

    @zKici: some conditional compilation might actually do the trick for everyone, but the real problem is that the "obsolete" things concern Unity's undo system. And... Unity's undo system has always being quite a pain (no decent documentation, and to create an efficient undo system I had to go through a lot of trial error). So what worries me is that the new methods they suggest to use might not really work. I'll try to implement them conditionally, and see what happens.
     
  18. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    New HOTween Update: v1.2.031

    - Fixed bug where GetAllTweens, GetAllPausedTweens and GetAllPlayingTweens methods threw an error when no tween existed

    Latest version is on the website


    @Ben Bearfish: fixed (now if no tweens exist, the resulting list will simply have a count of 0) :) By the way... WHAT HAPPENED TO YOUR FACE!?!?!? :D
     
  19. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,193
    Thanks for the update. I updated my avatar to the main character of the game I'm currently working on. :)
     
  20. npruehs

    npruehs

    Joined:
    Jul 20, 2012
    Posts:
    67
    @Izitmee:

    Which else do you require? :)
     
  21. npruehs

    npruehs

    Joined:
    Jul 20, 2012
    Posts:
    67
    @Vevusio: You're using UnityEditor code in your PathPreview script. Lines 160 and 170 call Handles.DrawLine which is not available in release builds. I'd suggest you'd either a.) #if UNITY_EDITOR them out or b.) put this code into a custom inspector (which would be the far cleaner solution). This would help our build server to stop complaining ;) Thanks!
     
    Last edited: Mar 7, 2014
  22. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    @npruehs: those lines of code don't exist: I suppose that's a "summary" of his code changes? I would need the line number that he changed, and what it looked before. Unless with "scene file" you really mean that he had to change the .unity file and not something inside the Visual Editor code? :O (though thinking about it, that actually kind of makes sense, and explains why it's working in the code, but gets broken when serialized and the assembly is changed - let me know)

    @Ben BearFish: looks like a cool game, at least from your character ;)
     
  23. npruehs

    npruehs

    Joined:
    Jul 20, 2012
    Posts:
    67
    @Izitmee: That's exactly what I was talking about ;) I was referring to the actual scene files (*.unity). Deleting the old assembly and adding the new one (with different file name) was breaking all referencing scene files, as they couldn't find the referenced assemblies anymore. Quick fixes: Rename HOTweenMicro.dll to HOTween.dll OR text editor -> Find Replace in all scene files.
     
    Last edited: Mar 7, 2014
  24. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    Thanks, I get it now. Mhmmm the only solution then would be to truly name the assemblies identically. Though I'm worried about people thinking they're using HOTweenMicro while instead they're using HOTween (or viceversa). I'll think about it and contrive a way to distinguish them :)
     
  25. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    IMPORTANT UPDATE
    New HOTween Update: v1.3.000

    - HOTween and HOTweenMicro DLLs now have the same name. This fixes an issue with the Visual Editor, in case tweens had been serialized for HOTween, and then you switched to HOTweenMicro. To know which one you're using, just select either the HOTween GameObject during runtime, or the HOTween.dll file in the Project Window, and Unity's inspector will show you the version.
    - Made the runtime Inspector more readable

    IMPORTANT: Projects that use HOTweenMicro and HOTween Visual Editor prior to HOTween v1.3.000 will have issues with the new version, since some property will point to HOTweenMicro.dll instead than the newly named HOTween.dll. To fix eventual issues, just rename HOTween.dll/xml/dll.mdb to HOTweenMicro.

    As usual, latest version is on the website.

    Thanks npruehs for finding the HOTween/HOTweenMicro issue, and thanks to your co-worker for showing me the way to solve it :)
     
  26. Little-Big-Monkey

    Little-Big-Monkey

    Joined:
    Mar 4, 2014
    Posts:
    35
    Thank you for the really fast update !
    Nice to see you also agree with most of my suggestion ;-)
    Did you also find the error when playing a delayed tween with HOTween.Play("stringid"); ?


    Here another suggestion :
    I face a case where I need to tween a position from a value, to another value (for exemple x-axis -10.0f to 10.0f), but the current position could be anywhere.
    So may be some sort of FromTo() methods where you can set start value and end value, could be usefull.

    By the way, is it possible to create sequences in the editor ?


    Thank again for you time ! ^^
     
    Last edited: Mar 7, 2014
  27. herbatronic

    herbatronic

    Joined:
    Jan 17, 2014
    Posts:
    1
    Hi, I just want to say thanks for your work! In the short time I've been using the extension it has already made my life a lot easier. Keep up the great work!
     
  28. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    @herbatronic: thanks for telling me :)

    @Little Big Monkey: the delay issue is related to the Visual Editor, since with tweens created via script everything works correctly, and since the Visual Editor is a separate thing, I'm tackling it now ;)
    About FromTo, no way :D Considering that, to do the same thing, you just need an additional line of code before the tween creation (to set your target at the desired starting value).
     
  29. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    @Little Big Monkey: in the end, it was an HOTween issue, not a Visual Editor one (I forgot to re-read all you wrote me to replicate the issue, when I posted initially). Here, this solves it (v1.3.010). Please make a test and let me know if it's alright.
     
  30. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
  31. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,331
    What is the best way to handle the following:

    I have multiple Hotween sequences that are generated in code that are then added to a List seqList.

    I would like to iterate through this List and have the sequences play automatically one after the other.

    I tried doing:

    foreach(var seq in seqList){
    seq.Play();
    }

    but this is giving the correct behaviour.

    Cheers.
     
  32. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    Code (csharp):
    1.  
    2. var mySeq = new Sequence();
    3. foreach (var seq in seqList) {
    4.   mySeq.Append(seq);
    5. }
    6. mySeq.Play();
    7.  
    You can insert Sequences inside other Sequences ;)
     
  33. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,331
    Ah yes, this is what I was missing. Thanks.

    btw, I saw your http://hotween.demigiant.com/testRun.html
    and it has one example of a Nested Sequence.

    I download the "HOTweenExamples_speedTestComparison.unitypackage" but it doesn't have this example.

    Could you give me the link to the package that has the all of the examples that's on the testRun menu.

    That would really help me to learn.

    Cheers.
     
  34. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    The "HOTweenExamples_speedTestComparison.unitypackage" contains only the speed test, because at the time it seemed fair that people could be allowed download it and test it themselves. But the whole test run package that is online is super-old (still uses an alpha version of HOTween) and I don't know if I still have it. Will take a look tomorrow and eventually see if I can wrap up something similar without spending too much time :p
     
  35. Disastercake

    Disastercake

    Joined:
    Apr 7, 2012
    Posts:
    314
    I wanted to start by saying thank you for keeping a great tweening library up to date. I've been transitioning away from iTween to HoTween, but one thing I'm not finding in the API are some of the helper methods that iTween has like rotating towards a specified point (rather than specifying the target rotation). This type of method combines Unity's Transform.LookAt() method with the tween library.

    If this type of helper method doesn't exist, what do you feel is the most effective way to get the lookat rotation to pass to HoTween?

    Also, I get this error a lot since I use HoTween in rotating Player and AI characters:
    Code (csharp):
    1. HOTween : PlugQuaternion is overwriting PlugQuaternion for Player(Clone) (UnityEngine.Transform).rotation
    It doesn't seem to negatively affect the code, but the debug spam kills the framerate in the editor and throws off testing performance. What is the proper way to avoid this warning when constantly updating a HoTween on an object every frame?

    Thanks again!
     
    Last edited: Mar 12, 2014
  36. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,193
    I was wondering if there was a way to check if the current target gameobject was Active or NotActive, and have its Tweener stop when it is was not active, and start playing when it was Inactive? In a TweenParms perhaps?

    I know I can do it in OnEnable and OnDisable, but was checking if it was built-in to save me a little time.
     
    Last edited: Mar 12, 2014
  37. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    I'd like to pass a Callback as an argument to a function that starts a Tweener, a la:

    Code (csharp):
    1. public void doMoveOpposite ( System.Action callback ) {
    2.  
    3.         HOTween.To ( transform, dur, new TweenParms()
    4.                     .Id( string.Format( "TweenShip{0}", id ) )
    5.                     .Prop ( "localRotation", targetRot )
    6.                     .Prop ( "position", targetPos)
    7.                     .Ease ( EaseType.EaseOutSine )
    8.                     .Loops ( 1, LoopType.Yoyo )
    9.                     .OnComplete ( callback )
    10.                     );
    11.     }
    Problem is ... What is the type of the passed paramter? TweenCallback? How would I pass that? I can't seem to get the type right.
     
  38. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,193
    If you're passing an Action, you have to do this:

    Edit: (What Izitmee said below)
    Code (csharp):
    1. OnComplete ( ()=> callback() )
     
    Last edited: Mar 13, 2014
  39. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    Yeah, makes sense, will try that.

    What if I am not passing an Action, but a normal method (void, no parameters)?

    EDIT:
    Uhm, no, that gets me a:

    Code (csharp):
    1. Only assignment, call, increment, decrement, and new object expressions can be used as a statement
     
    Last edited: Mar 13, 2014
  40. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    @Disastercake: it's relatively easy to create plugins for HOTween, so if someone wants to add a PlugLookAt and share it, it would be cool :) Otherwise, I'm superbusy now, but if you remember me about this in a week, I'll see if I can find the time to implement it. In the meantime, you could use Quaternion.LookRotation to find the correct rotation value.
    About that error, it's not really an error, but simply HOTween's OverwriteManager telling you that you're overwriting a tween that is currently playing. To avoid those warnings, you have 3 solutions:
    a) disable the OverwriteManager (not recommended)
    b) before recreating a tween with the same target and property of a running one, kill the previous one
    c) the simplest one, just set HOTween.warningLevel to WarningLevel.Important (instead than Verbose as default), which will not log overwrite warnings

    @Ben BearFish: you can use the KeepEnabled/Disabled tweenParms to enable/disable a Component/GameObject while the tween is playing. But otherwise, you'll have to use OnEnable and OnDisable. Since HOTween doesn't necessarily use Components as targets, a callback for such a thing would be too elitist :p

    @Bradamante: to pass an action, what Ben Bearfish said is right, except you have to add the parenthesis after "action":
    Code (csharp):
    1.  
    2. .OnComplete(()=>action())
    3.  
    To pass a simple void method with no parameters instead, it's even simpler:
    Code (csharp):
    1.  
    2. .OnComplete(SomeFunction)
    3.  
     
  41. adamcihuy

    adamcihuy

    Joined:
    Feb 1, 2014
    Posts:
    4
    Hello izitmee,
    i'm sorry that i'm new to unity stuff and new to programming too :p i'm currently use instantiate and destroy object for rigidbody2d in my current project, and a lot of people here said that bad for performance especially for mobile project, in these case, can i use hotween as pooling and moving object solutions ?
     
  42. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    Well I am not asking how to pass a function to OnCompete(). See my code posted above: I want to know what type to receive in a function that receives a function item to pass to OnComplete().
     
    Last edited: Mar 14, 2014
  43. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    @Bradamante: I saw both posts, and thought I answered to both questions. If you're talking about passing also TweenEvent parameters to the function, here it is. Or I didn't understand something?

    @adamcihuy: if you can pool objects it's certainly way way better than destroying and recreating them. But HOTween can pool only tweens, not objects. To pool objects, I suggest a pool manager, like this open source one by Mr Boon.
     
  44. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    Did you answer this one? I am getting confused myself.

    The question is: What is the type for this one (see above or link):

    Code (csharp):
    1. public void doMoveOpposite ( System.Action callback )
     
  45. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    Oh ok, I think I got it :) You can pass a System.Action, and for that you just have to write
    Code (csharp):
    1.  
    2. .OnComplete(()=>action())
    3.  
    as I mentioned, without any parameters needed. If instead you want to pass an action which accepts a TweenEvent parameter, here it is:
    Code (csharp):
    1.  
    2. public void doMoveOpposite ( System.Action<TweenEvent> callback ) {
    3.     HOTween.To ( transform, dur, new TweenParms()
    4.         .Id( string.Format( "TweenShip{0}", id ) )
    5.         .Prop ( "localRotation", targetRot )
    6.         .Prop ( "position", targetPos)
    7.         .Ease ( EaseType.EaseOutSine )
    8.         .Loops ( 1, LoopType.Yoyo )
    9.         .OnComplete ((TweenEvent e) => action(e))
    10.     );
    11. }
    12.  
     
  46. kocherovets.d

    kocherovets.d

    Joined:
    Mar 5, 2014
    Posts:
    10
    Hi!

    Help me please tune

    HOTween.To(transform, 5, new TweenParms()
    .Prop("position", GetComponent<HOPath>().MakePlugVector3Path().OrientToPath())
    .Loops(-1, LoopType.Yoyo)
    .Ease(EaseType.Linear)
    );

    for 2d sprite. I need to rotate sprite around Z axis and layout sprite toward path by left or right side.
     
    Last edited: Mar 14, 2014
  47. odolphie

    odolphie

    Joined:
    May 22, 2013
    Posts:
    10
    A little help please, I've added the HOTween component to a game object and now I want to play it from a script. I found this on the official page.

    Code (csharp):
    1. HOTweenComponent tweenComponent = myGameObject.GetComponent<HOTweenComponent>();
    2. if (tweenComponent != null) {
    3.   List<Tweener> tweeners = tweenComponent.generatedTweeners;
    4.    // Do something with the Tweeners
    5. }
    This feels like an embarrassingly easy question, what do I need to put in to replace the // Do something line to just play the tweener. The ID of in the inspector is set to SpringIn if it helps.

    I've got the gameobject reference setup.
     
  48. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    @odolphie: if you just want to play a tween created by the Visual Editor, you don't need all the code. Simply give the tween an ID (in the Visual Editor "id" field), and then do:
    Code (csharp):
    1.  
    2. // if for example the Id is "helloWorld"
    3. HOTween.Play("helloWorld");
    4.  
    @kocherovets.d: Sorry if I'm not answering for HOPath, but that's a separate plugin done by Vevusio. Hope someone else (or Vevusio himself) will answer you.
     
  49. Bradamante

    Bradamante

    Joined:
    Sep 27, 2012
    Posts:
    300
    Hm, OK, that semi-answers my question. But actually my question was about changing the type of the function argument of "doMoveOpposite" to not be a System.Action anymore, but instead whatever HOTween actually feeds the OnComplete with (Tweener.TweenCallback or something?).

     
  50. Izitmee

    Izitmee

    Joined:
    Jan 27, 2011
    Posts:
    3,229
    HOTween uses "TweenDelegate.TweenCallback" instead of Action, and "TweenDelegate.TweenCallbackWParms" instead of Action<TweenEvent>, but actually they're just kind of an alias for Action and Action<TweenEvent>. They can be used, since they're public, but they're in the Holoville.HOTween.Core namespace (which you'll have to import/use if you really want to use them), so I'd suggest sticking with System.Action.
     
unityunity