public NavGraph FindGraphOfType (System.Type type) { if ( graphs != null ) { for (int i=0;i<graphs.Length;i++) { if (graphs[i] != null && graphs[i].GetType () == type) { return graphs[i]; } } } return null; }