Unity Tutorial 02

Unity logo
Source here.

Today I watched two video tutorials on Unity 02 (Episode 4 & 5). The aim of these tutorials is to observe and learn how I can apply useful techniques to my own game, created via Unity.

What I learned:

Episode 4:
- You can put in sound effects for when the player interacts with another object (e.g a coin / gem etc).
- 'Play on awake' option means you can have a noise play as soon as you open the game.
- Looping allows audio to play on repeat.
- Public AudioSource allows you to implement the audio in C sharp coding.
- OnTriggerEnter is when the player comes in contact, or hits the object.
- CollectSound.Play allows the noise to play.
- TheGem.Set Active (false) makes the gem (or your created object) disappear.
- Box Collider creates a box around your selected object (you can increase or decrease size), but mesh collider morphs into the shape of the object. This is used when the player crosses the line of the box or mesh collider then the sound effect will go off.
- Adding // in your code turns the text into a comment.
- When you put 'this' into your coding, it basically means whatever object the script is attached to.
- Errors appear in the console area.
- You can import water through your Unity assets.
- You can increase and decrease water level.
- Holding ctrl for snap settings - which would already be written out manually.
- Go into directional light to create shadows ( shadow type - hard / soft).

Episode 5:
- Canvas represents the entire screen.
- The canvas overlays everything we create in our scene (creates an object in front of player, by default in the centre of the screen)
- Whilst on canvas, if you select escape and go on inspector panel and click the colourful box, you can turn the object off.
- You can anchor position of the canvas anywhere on screen.
- Ray cast determines how far an object is from the object it's looking at.
- Static variable means this variable can be referred from different scripts.

Comments

Popular posts from this blog

Introduction to a CDM student.

Original Game Brainstorm.

Tech Task - How to Secure your Smartphone!