Search Unity

[C#] How to sort dictionary without causing JIT error in IOS?

Discussion in 'Scripting' started by traunay, Apr 13, 2016.

  1. traunay

    traunay

    Joined:
    Oct 24, 2013
    Posts:
    16
    Hi guys,
    So in order to sort my dictionary I use Orderby from LINQ extension

    Something as simple as :

    foreach (KeyValuePair<string, ItemTypeData> type in HairItemsCollection.OrderBy(i => i.Value.Price)){
    }

    Apparently this line is causing a JIT problem when I try to make IOS build.. I guess I can manually sort my dictionary without using orderby but i was hoping there's a way to still do this cause I do this quite alot.

    Is there a way in C# to get around this?

    Thanks