How to change physics,lighting, and camera when a specific input is entered in-game?

I am creating a game where the player is able to switch between top down view and side scroller. When a button, say spacebar, is pushed, the camera, lighting and physics would need to switch to a top down perspective (or vise versa) . I have already written scripts for the side scroller and top down controls/physics, but I don’t know how to switch between them in-game.

Ps. I am very sorry that I am asking with out contributing. I am currently learning to program and I will begin to contribute. I am just in over my head with a rapidly approaching deadline.

Edit: I would not need the camera to change in any way.

Without the scripts to reference, I think you would want something along the lines of, meaning you’ll have to adapt it to your problem. If you were to group all of the physics, lighting, and camera into a single GameObject, you could just enable/disable that object.


var sideCam : GameObject; // you'd have to define this in the editor  
var topCam : GameObject; // this too  
public var onTop : boolean = true; // should you want to start out on top, set this to true  
public var onSide : boolean = false; // and set the other to false

function Update () {  
if (Input.GetKeyDown(KeyCode.Space) && onTop == true) { //flip to side  
onTop = false;  
onSide = true;  
sideCam.enabled = true; //enable side cam  
topCam.enabled = false; //disable top cam  
if (Input.GetKeyDown(KeyCode.Space) && onSide == true) { //flip to top   
onTop = true;
onSide - false;
sideCam.enabled = false; //disable side cam  
sideCam.enabled = true; //enable top cam  

It sounds like you are trying to combine two 2D games.

Why not implement it as 3D and just change the camera when the user presses a button? Then
you don’t have to worry about changing physics or synchronizing two totally different sets of gameplay?