Example #1
0
        public static NavMeshTestData Load()
        {
            IFormatter      formatter = new BinaryFormatter();
            Stream          stream    = new FileStream(GetPath(), FileMode.Open, FileAccess.Read, FileShare.Read);
            NavMeshTestData data      = (NavMeshTestData)formatter.Deserialize(stream);

            stream.Close();

            return(data);
        }
Example #2
0
        public void ShowSurface()
        {
            NavMeshTestData data = new NavMeshTestData();
            Dictionary <int2, NavMeshTile> tiles = new Dictionary <int2, NavMeshTile>();

            NavMeshStoreSystem.Instance.LoadTiles(SurfaceId, tiles);

            if (tiles.Count > 0)
            {
                data.SetTiles(tiles);
                DisplayFilter.sharedMesh = data.ToMesh();
                DisplayFilter.gameObject.SetActive(true);
            }
        }