Unity 3D - Debug

    xiaoxiao2025-04-04  14

    Unity 3D - Debug :

    辅助画线 Debug.DrawLine :

    官方API 描述 :

    C# 代码 :

    Debug.DrawLine (transform.position, player.transform.position, Color.red);

    参数说明 :

    一共5个参数( 通常只需要填前3个 ) :

    start : 开始位置 .end : 结束位置 .color : 线的颜色.duration : 需要显示的长度 ( 不常用 ).depthTest : 摄像机遮蔽 ( 不常用 ) .

    注意 : 只有Scene中才能看见绘制的线 ! Game视图下是看不见的 !

    游戏内效果图 :

    转载请注明原文地址: https://ju.6miu.com/read-1297730.html
    最新回复(0)