So I am calling a SetDestination function, but the error says "It can be only called if its placed on a NavMesh". I saw tutorials making navmeshes in inspector, but my terrain is generated using scripts, so I cant do anything with it in the inspector. So I was thinking about a way to set the blocks, which are used to build the terrain, to the NavMesh in script when they are being generated. However I wasnt able to find anything online. Is there any way to do this, or a similar thing?