private static void DictonarySort(Dictionary<int, Vector3> dic, ref Dictionary<int, Vector3> refDic)
{
dic = (from temp in dic orderby temp.Key ascending select temp).
ToDictionary(pair => pair.Key, pair => pair.Value);
foreach (var item in dic)
{
refDic.Add(item.Key, item.Value);
}
}