Can someone please explain the thinking around why we need to protect guardPosition = transform.position
in AIController.cs
, yet @sampattuzzi decided (unfortunately without much explanation) that we didn’t need to protect transform.rotation
(via LookAt()
) in Projectile.cs
.
It seems we’re protecting guardPosition
“to be safe” even though it isn’t currently accessed by another component’s Start method. If that’s the case, shouldn’t we be proactive and try to protect a Projectile’s transform.rotation
too?
Or does @sampattuzzi not care in this case because we don’t expect a Scene asset to ever contain a Projectile instance at Load time?
Just wondering if there’s some reason or explanation around this omission that might help me form my mental set of guidelines.