I have been wondering a few things.
-
In several projects we have Instantiated objects using with the “as” keyword. What exactly does this accomplish, especially when we have declared the type of the variable as the same object type. I have removed the “as ObjectType” in each case, and everything has functioned as it was supposed to.
-
We have seemed to use the variable “gameObject” in place of what I would traditionally use “this” for. Is it just a “this” for Unity GameObjects, or is it more (or less)?
-
(And why I finally asked in this lesson.) Why are we seem to be setting the parent of the attacker to be the transform object on the Spawner instead of the Spawner itself?