📜  debug.drawray - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:38.088000             🧑  作者: Mango

代码示例1
using UnityEngine;

public class Example : MonoBehaviour
{
    // Frame update example: Draws a 10 meter long green line from the position for 1 frame.
    void Update()
    {
        Vector3 forward = transform.TransformDirection(Vector3.forward) * 10;
        Debug.DrawRay(transform.position, forward, Color.green);
    }
}