Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How do you load NavMeshTriangulation data?!

Discussion in 'Scripting' started by Ziron999, Feb 11, 2019.

  1. Ziron999

    Ziron999

    Joined:
    Jan 22, 2014
    Posts:
    282
    I am creating an infinite terrain and can save the triangulation of the navmesh data but i don't know how to load it?
    Code (CSharp):
    1.     public void SaveData()
    2.     {
    3.         NavMeshTriangulation test = NavMesh.CalculateTriangulation();
    4.         //transform.parent.GetComponent<MapMagic.MapMagic>().seed
    5.         PlayerPrefsX.SetIntArray(SceneManager.GetActiveScene().name, test.indices);
    6.         PlayerPrefsX.SetVector3Array(SceneManager.GetActiveScene().name, test.vertices);
    7.     }
     
    Last edited: Feb 11, 2019
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,520
  3. Ziron999

    Ziron999

    Joined:
    Jan 22, 2014
    Posts:
    282
    hmm, i'll try it out!
     
  4. Ziron999

    Ziron999

    Joined:
    Jan 22, 2014
    Posts:
    282
    nope, can't figure out how to do anything with that...