I'm working on a 2D app with multiple menus and I would like them to slide transition into each other (current menu goes left while new menu comes in from the right, for example).
My first attempt I wrote a script that would enable the parent GameObject for a menu and move the menu (lerp) across the screen. All menus were under the one canvas which was set to Screen Space - Overlay, but a different GameObject for each menu. This achieved the desired effect but when I ran in on my Android test phone the framerate would drop for 60 fps to 25 fps during the transition. I figured moving the menu GameObjects with all their elements was too much.
This led to attempt two where I made the GameObjects stay still and slide (lerp) the camera past the canvas instead. I made the canvas world space and scaled it to fit the camera perfectly. However, when testing again on mobile I found the framerate dropped to around 20 fps consistently. Not just during transitions but on menus too, even when not interacting with the menus.
Is there any way to keep the GameObjects still and move the Game View, if the canvas is set to Screen Space - Overlay or ScreenSpace - Camera? Is there any way to do simple menu transitions without slowing my app down like nobodies business?