实现一个点击地面,人物移动并显示导航路径的效果。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class Player : MonoBehaviour
{
NavMeshAgent agent;
public LineRenderer line;
Vector3 target;
int PlaneLayer = 1 << 9;
// Start is called before the first frame update
void Start()
{
agent = GetComponent<NavMeshAgent>()</


1960

被折叠的 条评论
为什么被折叠?



