Why GameObject instead of Transform for Walktarget?

I used a transform for my Walktarget and it works just fine.

Transform Target;

in void Start()

    Target = new GameObject("walkTarget").transform;

in void ProcessMouseClick

            Target.position = raycastHit.point;

So is there a reason you did not mention? See how much cleaner that is? That should use less RAM too right?

Privacy & Terms