Switch viewport on button press.

How do i switch the main viewport on a button press i am making a main menu and the viewport is just a camera and i have a button which i want to press and then switch to another camera and make that the viewport if that makes sense.

find a reference to that Camera and use set active .if you want to find a reference to that camera first select it and in panel in right side of screen find actor (or component )tags and set it to something like “Second” .Then use get all actors of class node and use a for each loop and if tag== “second” then setActive.