In my game, I have one menu at the bottom of the game scene and it contains 5 buttons. Clicking on each button causes a side panel to eject out from the side of the game that is from left to right. I had used iTween to give the effect when the side panel pops to the screen, when the bottom menu button is clicked. This is done on earlier version of unity 4.5. Yesterday, I upgraded my unity to the latest version of 4.6. I found that now the ui elements such as buttons etc are now moved and positioned using Rect Transform instead of normal Transform. What I found difficult is that, in my code, I had used iTween like this:
public var SidePanelOptionsToScreen;
function Start ()
{
SidePanelOptionsToScreen= iTween.Hash("x", -10, "easeType", "easeOutBounce", "loopType", "none", "delay", .02);
}
function MoveTween(SidePanel:GameObject)
{
iTween.MoveTo(SidePanel,SidePanelOptionsToScreen);
}
The problem is that earlier, I used to move the game object from x=0. This was the transform position of X in the game scene. But when I run the same code on the unity 4.6, the value of the sam panel is now at PosX= -800. When I tween the same side panel using the abouve iTween code, the side panel moves from -800 to -520.8572. That mean the side panel moved about -279 instead of -10. Hodoes that happen? Because of this, the entire UI whihc I had now created in 4.5 Unity now looks unordered when run in devices after coding it in new unity 4.6. Can some one help in the iTween. MoveTo function for using to move in the rect transform of buttons in the new unity 4.6.
A little help from some one is easily appreciated. Thanks in advance…