Thursday 20 February 2020

Unity Tutorial 04


Unity Tutorial 04
In this week's Unity tutorial we create a new project that allows use to use players to feed animals in our game. We begin creating the game by adding the player, the animals and the food. Once we have added these game objects we can then start working on the C scripting. In the script we coded the players movement inputs. We added movement to the player by giving up forward, backward, left and right movement. We also added variables to the code to clean everything up. 

Next, we then added the projectile prefab. A prefab is a "prefabricated" game object that is already made for us and is ready to use. Once we added the prefab into Unity it was ready to use. The function of the prefab is to launch a piece if food through the scene by pressing space bar. 

The next step was to add in the spawning mechanisms for the animals. For this tutorial we were working with prefab game objects that functioned as animals. The first think we did was created a spawning manager for the animals. We created the object and script so that an animal would spawn in when the player pressed S. 

Coding and other game development tasks are not really my strong point but I felt in this tutorial that I did not struggle too much. My understanding of the Unity engine is getting better. 

Image info:
Screenshot of Unity Tutorial

No comments:

Post a Comment

Unity Tutorial 06