Search Unity

about using Navmesh without unity3D

Discussion in 'Navigation' started by Nsuidara, Oct 4, 2017.

  1. Nsuidara

    Nsuidara

    Joined:
    Apr 22, 2016
    Posts:
    36
    Somebody give TIP about it's possible using navmesh without Unity3D ?

    what mean ? example, when i writing server - i need control where player can move or not
    (and not for point-click mouse, but player control character with WSAD)
    but for me navmesh it's nice for check where player can move or not, but i can't find it's possible save file and read file navmesh (outside apps) and check...

    // ofc. my option two, leave in scene nevmash, and in editor bake my own file (more simple...)
     
  2. Nsuidara

    Nsuidara

    Joined:
    Apr 22, 2016
    Posts:
    36
    Ok, i little stupid sheep ^^

    because it's Mesh...
    so i can take vertices and triangles and can save this data into other file...
    and prepare function checking point is in or not in this mesh.. >_>
     
  3. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    I really dont think you understand the way the Unity API works or Unity as a whole.

    Yes navmeshes can be used in your Unity built programs on computers without unity. Is that not the point of making a game with unity?

    Perhaps I dont understand your question but it very much seems like you think Unity must be installed on a users pc. If not, then no you cant use unity to build a navmesh for use in another application.
     
  4. Nsuidara

    Nsuidara

    Joined:
    Apr 22, 2016
    Posts:
    36
    You made post for without a reply question...
    I think nobody undestand all modules in Unity3D when use the module first time...

    Who said i need this knowledge for game ?

    Yes you don't undestand...
    Code (CSharp):
    1. NavMeshTriangulation triangles = NavMesh.CalculateTriangulation();
    2. Mesh mesh = new Mesh();
    3. mesh.vertices = triangles.vertices;
    4. mesh.triangles = triangles.indices;
    i can always save vertices and indices into file... example TXT.

    and no need "it very much seems like you think Unity must be installed on a users pc" ...
    because the mechanic isn't for game or users PC... it's for server...
     
  5. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Again nothing you have said is making much sense. It sounds like you want to make an application using a normal c# .NET framework, there are other software that make navmesh for similar purposes! Honestly using unity for something like this seems like overkill!

    If you dont want to take my advice though, you will need to learn about editor scripting, and then build a navmesh and use an editor script to read that navmesh data and serialize it to a text file or whatever format you want, then write some kind of algorithm on your "server" to read this data and interpret it.

    EDIT: https://docs.unity3d.com/Manual/ExtendingTheEditor.html

    https://docs.unity3d.com/ScriptReference/AI.NavMeshBuilder.html

    to get you started.