I am trying to create a UI with a side panel that is collapsible. I am achieving the results using tween and seems pretty simple. The problem on the other hand is that I would want the Side panel to slide to the right side of the screen when the button is clicked and slide back in when the expand Button is clicked, irrespective of the device dimensions. Any Ideas?
The attached images show what the expectations are.
So, if you set your element anchor to the right side, then the element’s local position will be 0 on X axis, when the element will be right at the edge. You can then slide it to the negative X to move it torwards the center of the screen and back to 0 to return to the edge.
Thank you so much, that was a great solution
Although the panel is still not adjusting to the device width, but that is something at my end because I don’t understand the concept of Anchors very well yet. Will read a bit more about it today and post the updates.