using UnityEngine; using System.Collections; public class GridMap : MonoBehaviour { public int m_mapWidth = 10; //宽度 public int m_mapHeight = 10; //长度 void OnDrawGizmos() { Gizmos.color = Color.blue; //绘制宽度的线 for (int i = 0; i < m_mapWidth; i++) { Gizmos.DrawLine(new Vector3(0, 0, i), new Vector3(m_mapHeight, 0, i)); } //绘制长度的线 for (int i = 0; i < m_mapHeight; i++) { Gizmos.DrawLine(new Vector3(i, 0, 0), new Vector3(i, 0, m_mapWidth)); } } }
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。