Esempio n. 1
0
    private void OnDrawGizmos()
    {
        Gizmos.color = Color.blue;
        //Gizmos.DrawWireSphere(transform.position, 1);
        if (m_grid != null && m_start != null && m_end != null)
        {
            List <GridNode> nodepath = m_grid.FindPath(m_start, m_end);

            if (nodepath != null)
            {
                foreach (GridNode node in nodepath)
                {
                    if (node != null)
                    {
                        Gizmos.DrawWireSphere(node.worldPosition, 1);
                    }
                }
            }
        }
    }