Search Unity

How do you load NavMeshTriangulation data?!

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

  1. Ziron999

    Ziron999

    Joined:
    Jan 22, 2014
    Posts:
    238
    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:
    3,766
  3. Ziron999

    Ziron999

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

    Ziron999

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