mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using JNGame.PathFinding;
|
|
using UnityEngine;
|
|
|
|
namespace Lockstep.Game
|
|
{
|
|
/// <summary>
|
|
/// 地图调试可视化
|
|
/// </summary>
|
|
public class MapVisualize : MonoBehaviour
|
|
{
|
|
#if UNITY_EDITOR
|
|
public bool isDrawMap;
|
|
|
|
public void DebugVisualize()
|
|
{
|
|
// if (GSystem.Root == null) { return; }
|
|
|
|
// var Map = GSystem.Root.GetService<DemoMapService>()?.Map;
|
|
//
|
|
// if (Map is not null)
|
|
// {
|
|
// BspTree.s_DebugMat = Resources.Load<Material>("WhiteMat");
|
|
// BspTree.s_DebugTrans = gameObject.transform;
|
|
// Map.DebugVisualize();
|
|
// }
|
|
}
|
|
|
|
private void OnDrawGizmos()
|
|
{
|
|
// if (GSystem.Root == null) { return; }
|
|
|
|
// var Map = GSystem.Root.GetService<DemoMapService>()?.Map;
|
|
//
|
|
// if (Map is not null && isDrawMap)
|
|
// {
|
|
// // 绘制地图
|
|
// Map.DrawGizmos();
|
|
// }
|
|
}
|
|
#endif
|
|
}
|
|
} |