Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

NGenerics and Unity graph data structure usage?

$
0
0
Hi! I am trying to use NGenerics and one of its data structure - Graphs

Here is what i am trying (create a graph with Vertex<Transform> type and find the shortest path from the first node - it always returns 0,1,2…9 sequence):

Code (CSharp):
  1. for (int i = 0; i < 10; i++)
  2.         {
  3.             pos.Add(i, new Vector3(UnityEngine.Random.Range(0f, 10f), UnityEngine.Random.Range(0f, 10f), UnityEngine.Random.Range(0f, 10f)));
  4.         }
  5.  
  6.         var graph = new Graph<Transform>(true);
  7.         foreach...
NGenerics and Unity graph data structure usage?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>