I'm trying to output my dictionary values to a Unity string on the GUI (it's for a plug in). When I run my code without the data being outputted to the screen as a GUI label, it runs fine. No errors or anything, however, when I turn on the GUI code, I get the following message in Xcode:
ExecutionEngineException: Attempting to JIT compile method
'System.Linq.OrderedEnumerable2>:GetEnumerator ()' while running with --aot-only.
private string dictionaryString = "I am here!!!!!";
var signalQuailty = dictionary.OrderBy(item => item.Value);
foreach( var v in signalQuailty)
// Issue line. I want the dictionary to output everything on the screen
// with every line on a new line
dictionaryString = "Key value: " + v.Key + " Value: " + v.Value + "\n";
GUI.Label (new Rect (10, 410, 1000, 20), dictionaryString);
It seems that
OrderBy is not supported for the iOS target.
A lot of people have problem using LINQ on iOS, and the general advice is to "use LINQ with care when targeting iOS":