Нужна помощь что делать если появилась ошибка CS1061?
Assets/�⠭����/Standard Assets/Characters/ThirdPersonCharacter/Scripts/AICharacterControl.cs(33,27): error CS1061: Type `UnityEngine.AI.NavMeshAgent' does not contain a definition for `remainigDistance' and no extension method `remainigDistance' of type `UnityEngine.AI.NavMeshAgent' could be found. Are you missing an assembly reference?
Вот скрипт:
using System;
using UnityEngine;
namespace UnityStandardAssets.Characters.ThirdPerson
{
[RequireComponent(typeof (UnityEngine.AI.NavMeshAgent))]
[RequireComponent(typeof (ThirdPersonCharacter))]
public class AICharacterControl : MonoBehaviour
{
public UnityEngine.AI.NavMeshAgent agent { get; private set; } // the navmesh agent required for the path finding
public ThirdPersonCharacter character { get; private set; } // the character we are controlling
public Transform target; // target to aim for
public float maxDistance;
private void Start()
{
// get the components on the object we need ( should not be null due to require component so no need to check )
agent = GetComponentInChildren();
character = GetComponent();
// Update is called once per frame
private void Update()
{
if (target != null)
if (maxDistance > (Vector3.Distance(target.position, transform.position)))
agent.SetDestination(target.position);