How to animate rect(),
I wan’t change UnityGUI rect.![]()
How to animate rect(),
I wan’t change UnityGUI rect.![]()
Hi minevr ![]()
There is a plugin just for that, between HOTween’s default ones. You can simply store a rect property/field to assign at each OnGUI call, and then tween it: values will be changed by HOTween so each time the OnGUI updates the rect will be shown animated. For example, if the rect property is in the same class from where you call the OnGUI method and create the tween, you could do:
HOTween.To(this, 2, "myRectProperty", new Rect(0, 0, 200, 100));
Thanks,I get it~~ ![]()
Anything is string…
I’m not sure what you mean with “anything is string”, but just to avoid confusions: the only string you need to insert in HOTween is the name of the property/field to tween (unless you’re tweening a string, in which case you’ll also need a string for the end value) ![]()
BCE0005: Unknown identifier: ‘PlugRect’.
How to fixed it?
PlugRect is one of the default plugins, so you don’t need to write it (and if you do, you’ll get that error, since it’s not in the Plugins namespace, but in the inaccessible Core one). If you need the TweenParms for the ease, you should do like this:
HOTween.To(this, 1, new TweenParms()
.Prop("Page_01_PageRect", Rect_GUI_On_Left, true)
.Ease(EaseType.easeInQuad)
);
Oh,Thank you very much. ![]()
HOTween.To( this, 2, new TweenParms().Prop( "Int_Page_02", 0, false).Ease( EaseType.EaseOutQuart));
On Editor, is ok.But build to IOS,animation is false.
If you’re building for iOS with stripping level set to max, you need HOTweenMicro (same API, so you don’t have to change anything in your code: just delete the HOTween files and replace them with HOTweenMicro’s).
I get it~WOW~.Thanks.
ps:My “Stripping Level” is Disabled
“Prop( “Int_Page_02”, 0, false)”
if “Int_Page_02” is array,
Can’t support [“Prop( “Int_Page_02[0]”, 0, false)”]?
sorry,so basic…
Ah no, sadly there’s no way to animate an element of an Array/List. You can only animate an int/float/etc field/property.
var Rect_SmallPicBtn_1 : Rect;
var Rect_SmallPicBtn_2 : Rect;
var Rect_SmallPicBtn_3 : Rect;
var Rect_SmallPicBtn_4 : Rect;
var Rect_SmallPicBtn_5 : Rect;
var Rect_SmallPicBtn_6 : Rect;
…
Haa~~
Exactly
And they must be public (which is the default setting for JavaScript in Unity, if I’m correct, so that should work)