x


LeanTween.moveX argument list error

When I try to use LeanTween based on the structure of their argument list for moveX based on their documentation, I get an error "No appropriate version of 'LeanTween.moveX' for the argument list '(UnityEngine.GameObject, float, float)' was found."

This is the code that gives the error:

LeanTween.moveX( GameObject.Find("buttonA"),7.0,1.0);

In contrast, LeanTween.move seems to work fine:

LeanTween.move( GameObject.Find("buttonA"),Vector3(1,1,1),1);

Any ideas to why moveX argument structure is wrong?

more ▼

asked Apr 28 '13 at 05:32 PM

unitygal gravatar image

unitygal
73 8 11 14

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Hi UnityGal, Most methods do support leaving off the optional parameter on the end, but it appears that moveX does not, so if you just pass it an empty array or hashtable for that argument it should work fine:

LeanTween.moveX( GameObject.Find("buttonA"),7.0,1.0,[]);

I'll update LeanTween to support this for future versions!

more ▼

answered Apr 28 '13 at 10:09 PM

dentedpixel gravatar image

dentedpixel
278 1 4

Thanks for the solution! Would love to see the updated version since "optional" sounds like it's not required :)

Apr 29 '13 at 02:49 AM unitygal

Indeed, it will be included in the next update to LeanTween. You can get the latest update on Github as well, if you want it right away.

Apr 29 '13 at 11:20 AM dentedpixel

Great, thanks! Love the capabilities and performance of LT!

Apr 30 '13 at 12:56 AM unitygal
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2969
x28

asked: Apr 28 '13 at 05:32 PM

Seen: 527 times

Last Updated: Apr 30 '13 at 12:56 AM