I tried this:
private List<GameObject> objects;
private List<int> points;
private Dictionary<GameObject, int> objectsAndPoints;
private void Start()
{
for (int i = 0; i < objects.Count; i++)
{
objectsAndPoints.Add(objects[i], points[i]);
}
}
But it popups an error like this: NullReferenceException: Object reference not set to an instance of an object
And there aren't things like List.zip or Enumerable.Range in Unity / MonoBehaviour, they are for .net
Does anybody know how to map two array into a dictionary in Unity / MonoBehaviour