public static IPath CreatePath(this IPathSeeker seeker, Vector3 target)
        {
            if (seeker == null)
            {
                throw new System.ArgumentNullException("seeker");
            }

            return(seeker.PathFactory.Create(seeker, target));
        }
        public IPath Create(IPathSeeker seeker, Vector3 target)
        {
            Transform t;
            var       root = SPEntity.Pool.GetFromSource(seeker);

            if (root != null)
            {
                t = root.transform;
            }
            else
            {
                t = GameObjectUtil.GetTransformFromSource(seeker);
                if (t == null)
                {
                    throw new PathArgumentException("IPathSeeker has no known Transform to get a position from.");
                }
            }

            return(new AGAstarABPath(t.position, target));
        }