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;
            AICharacterControl.SetTarget(Target);

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

Privacy & Terms