My final project was to create a 2D platform game using Unity. So today I followed a Unity tutorial for beginners to learn the basics of Unity. The Unity has a default screen layout divided into 4 panels: hierarchy, scene, inspector, and project.
Next is to go to this link to download the images. And import the bird and pipe in the project panel. Then I created an empty gameObject called Bird. And in the inspector panel, adding a new component is Sprite Renderer. And move the bird image into the Sprite, then the bird is on the screen.
Then add one more component called RigidBody 2D. When you run it, the bird will falling down .
We can change the gameObject’s name in the visual studio code. Create a new script, add new component and call it Bird Script. Open that script, use the “.name()” method to change the gameObject’s name from “Bird” to “Bob Birdington”.
The gameObject’s name will change to “Bob Birdington” after you run it. You can also change its layer, static, and tag by “.layer()”, “.static()”, and “.tag()” methods. The tutorial that I followed to learn the basics of Unity was from the Game Maker’s Toolkit. You can watch it below.
No Responses