Forum rules - please read before posting.

About NavMesh

Hi Chris,

I am making the player moving along axis.
I do not need the NavMesh, so I do not define it in the setting.
But each time I run the game, I receive the warning to tell me to define the NavMesh.
Is it a must to define the NavMesh?
Can I get rid of the "NavMesh missing" warning message because I do not want it warn me every time.
Thanks a lot.

Comments

  • What's your Scene Manager's Pathfinding method set to? Polygon Collider?

    This will output a message if no NavMesh is defined. You could just assign a simple one off-screen, but you can also switch to a custom pathfinding method if you really aren't going to use it at all.

    Paste this code into a script named NavigationEngine_Empty.cs:

    using UnityEngine;
    using AC;
    
    public class NavigationEngine_Empty : NavigationEngine
    {
    
        public NavigationEngine_Empty()
        {}
    
        override public Vector3[] GetPointsArray (Vector3 startPosition, Vector3 targetPosition, AC.Char _char = null)
        {
            Vector3[] test = new Vector3[0];
            test[0] = targetPosition;
            return test;
        }
    
    }
    

    Then set the Pathfinding method to Custom, and the Script name to NavigationEngine_Empty. That'll then use the above script for pathfinding, which simply disables pathfinding and doesn't use a NavMesh.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.