Unity Tutorial 05


I learned from Lesson 2.4 that the start and update function belongs to the “MonoBehavior” class within a script. I also discovered that by using “void” in your script before a function or method lets it know that it does not return anything. This means that it will only do what we tell it to do in that section of code. I learned that the “InvokeRepeating” method takes a method that we want to call and then at a certain time will call that method. This will constantly repeat over time at whatever rate we choose. I learned that by ticking the trigger box in a box collider component allows another object to be detected when it enters the box collider. This means we can use code to make an object within a collider disappear when an object enters it which is what I manged to complete in this lesson. I discovered that you need to apply a “Rigidbody” component to colliders so the collider is able to detect a collision within the physics. I found out that the “Debug.Log” is a helpful feature to use if you want to check if something is working in Unity. I also learned that going into the edit menu in visual studio, clicking advance and finally pressing format document will reset the spacing of your script to make it easier to read.

"Lesson 2.4 Collision Decisions Progress"
Source: Personal screenshot I took in Unity


Comments