Thursday, June 2, 2016

Scenes

One of the features of the Unity game engine, which serves to keep up the pace of play,
is that each scene or level starts from anew. All the project assets and scripts are always listed, what  happens when I press play will depend on which scene I have opened.

Below, in Scene 1, the three upward cubes appear programmatically ( the script is appended to the directional light). I have to press the space bar, and they will show up and start rotating.


When I open Scene 2, the script is on the camera. Again, I press the space bar but I make the cubes rotate manually pressing either A, B, or C. There is an additional bit of code which moves the middle cube when I use the arrow keys.


 The light and camera are givens in every scene, although one can add additional views - and thus cameras and lighting -  within a scene.

No comments: