Child.position vs child.transform.position

While it works, as Transform objects have an inherited transform that references their own, it seems like it would be more clear to always use child.position rather than child.transform.position, which might be confusing as to what object type child really is.

I did it like this:

 foreach (Transform attackerTransform in myLaneSpawner.transform) {
     if (attackerTransform.position.x >= transform.position.x) {
         return true;
     }
 }

Privacy & Terms