Generated AOT code is wrong when building for iOS on Windows

http://issuetracker.unity3d.com/issues/datetime-difference-on-ios-device-and-in-the-editor


To reproduce: 
1. Create a new project 
2. Attach a script that debugs System.TimeSpan.MinValue.TotalSeconds or System.DateTime.Now.Ticks to the main camera 
3. Build on Windows for iOS 
4. Run Xcode project on Mac 
5. Notice that Xcode debugger/console logs numbers like: 4.0917397079469E+142 which are different from the numbers logged when the project is run in the Editor.


SMILEDIVER
Feb 17, 2014 11:41

This is caused by general AOT issues, and are not related to DateTime itself. To be more precise: wrong double and 64 bit int alignments, compiler optimization issues which makes AOT code to invoke wrong methods, etc. Fixes are targeted for the next Unity 4.x release.


你可能感兴趣的:(Generated AOT code is wrong when building for iOS on Windows)