Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice
  2. We've opened up a space to discuss, share feedback, and showcase everything related to the Unity Shader Graph! Come show us what you've made.
    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:
    217
    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,399
  3. Ziron999

    Ziron999

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

    Ziron999

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