• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by softready · Aug 20, 2012 at 05:35 AM · jit

using System.linq in Unity iPhone

I am trying to use System.linq implementations on Unity iPhone but having the following errors while trying to sort the variables.

 ExecutionEngineException: Attempting to JIT compile method 'System.Linq.OrderedEnumerable`1<System.Collections.Generic.KeyValuePair`2<string, string>>:CreateOrderedEnumerable<string> (System.Func`2<System.Collections.Generic.KeyValuePair`2<string, string>, string>,System.Collections.Generic.IComparer`1<string>,bool)' while running with --aot-only.

I know that Unity iOS disallowed the runtime JIT compilation. Does anyone know how can I precompiled the System.linq library to avoid JIT compile method?

I really appreciate to your answers.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Visartech · Oct 15, 2014 at 11:07 AM

Really, some LINQ methods are not supported with Mono compiler on iOS and cause JIT-compile errors. In case if you would like to use LINQ methods on iOS in Unity, I would suggest you to look at LINQ to iOS.

It's a custom implementation of LINQ to Objects extension methods that works without JIT-compile errors on iOS.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by andrey_bryzgalov · Oct 10, 2012 at 03:57 PM

Do not use value-types as keys in dictionary. KeyValuePair is structure, value-type.

More info about mono aot limitations

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Custom functions in SQLite and Unity 1 Answer

How to compile function? (to prevent JIT spikes) 1 Answer

Templates/Generic - AOT problems 1 Answer

Saving Data on IOS produces JIT Error in Xcode 2 Answers

ios: 2 function calls on the same interface, one working... the other function call doing literally nothing 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges