Hi all,
I am having a strange behaviour with an ArrayList and maybe you could help me.
GestureTemplates.Templates.Add(GestureRecognizer.newTemplateArr);
ArrayList a = (ArrayList)GestureTemplates.Templates[GestureTemplates.Templates.Count - 1];
Debug.Log("1. Size of new template " + a.Count);
GestureRecognizer.newTemplateArr.Clear();
a = (ArrayList)GestureTemplates.Templates[GestureTemplates.Templates.Count - 1];
Debug.Log("2. Size of new template " + a.Count);
In the first Log it returns me 64 but after performing the Clear() it returns me 0. I thought the ArrayList.Add() function was making a copy of the array. Both GestureTemplates.Templates and GestureRecognizer.newTemplateArr are static. What I am missing?
Thanks in advance