Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question NavMeshSurface Builder

Discussion in 'AI & Navigation Previews' started by cepurel, Oct 13, 2023.

  1. cepurel

    cepurel

    Joined:
    Aug 28, 2023
    Posts:
    1
    i have a code like this :
    private NavMeshSurface napmesh;

    public void start () {
    napmesh = GetComponent<NavMeshSurface>();
    }

    public void update (){
    UpdateNavMesh();
    }
    void UpdateNavMesh()
    {
    if (napmesh != null)
    {
    napmesh.BuildNavMesh();
    }
    }

    for create bake during runtime, but it keep showing this error :
    Cannot add menu item 'GameObject/AI/NavMesh Link' for method 'NavMeshLinkEditor.CreateNavMeshLink' because a menu item with the same name already exists. UnityEditor.EditorApplication:Internal_InvokeTickEvents () Cannot add menu item 'GameObject/AI/NavMesh Modifier Volume' for method 'NavMeshModifierVolumeEditor.CreateNavMeshModifierVolume' because a menu item with the same name already exists. UnityEditor.EditorApplication:Internal_InvokeTickEvents () Cannot add menu item 'GameObject/AI/NavMesh Surface' for method 'NavMeshSurfaceEditor.CreateNavMeshSurface' because a menu item with the same name already exists. UnityEditor.EditorApplication:Internal_InvokeTickEvents ()

    why is that? im still begginner please help.