We’ve been busy the last two weeks covering the basics of Unity. Among the topics we’ve touched on are:
- Customising the Unity layout
- Explaining what the main Unity windows (Scene, Game, Hierarchy, Project and Inspector) are each for
- Talked about 3D space and vectors and talked about the difference between local and global axes (child objects)
- Shown how to place objects in the scene and how to position, rotate and scale them
- Shown how to “fly” around the scene view
- Explained how the physics engine works (Physics clock monitoring and moving rigidbodies and tracking collisions and other interactions)
- Built a simple physics-based scene which had a ball fall, hit a ramp and roll into a bunch of stacked block
- Wrote a script to have the camera follow the ball as it moves
Additionally Mike kindly filled in and talked about the basics of object oriented programming, classes and class diagrams. There is a post from last year that covers this well for those who’d like to read it.
Additionally, the basics of the C# language that we discussed are covered in both that post which we have already linked to above and another which can be found here. The topics we touched on were:
- Curly braces as “containers” and the requirement that they occur in pairs.
- How semicolons (;) mark the end of statements
- Using directives and namespaces.
- A basic class declaration
- Properties, both public and private
- Methods, both public and private
- How Unity automatically calls certain methods at certain times, and some specific examples of this:
- Start() called when we start the game
- Update() called every time the scene is drawn
The up-to-date project file can be found here. Please note it will require Unity 4.5.1 or later.