Unity 4.0.0 known issues

  1. Some basic license users experience false detection of modified splashscreen problem when upgrading existing project to Unity 4.0. Tips to fix the issue:
    a) replace existing Xcode project, not append it;
    b) delete already installed project from device;
    c) clean derived data in Xcode (Preferences->Locations->Derived data)

  2. Unfortunately Unity 4.0.0 shipped with broken GPS lastData implementation. Though you can fix it easily in your Xcode project:
    open Classes/iPhone_Sensors.mm file, scroll to 447 line and change call to UnitySetLastLocation to look as follows:
    UnitySetLastLocation([newLocation.timestamp timeIntervalSince1970],
    newLocation.coordinate.latitude,
    newLocation.coordinate.longitude,
    newLocation.altitude,
    newLocation.horizontalAccuracy,
    newLocation.verticalAccuracy);
    Solution: upgrade to Unity 4.0.1

  3. Unfortunately Unity 4.0.0 shipped without iOS specific API docs. It is affects documentation only, so you can still use these functions in your code without a trouble.
    Solution: upgrade to Unity 4.0.1

The splash screen error happens for me as well on Unity 4.0 and Xcode 4.5 on Mountain Lion, and the tips don’t help. Any other ideas?

Hi,
I’m using a number of DLL’s in the plugin folder. These worked fine in Unity3.5.x. and iOS Basic, no AOT JIT compilation errors.
Product was approved and released.

Now, using Unity4 and iOS Basic they are throwing up a heap of AOT JIT compilation errors as described on Unity - Manual: Troubleshooting

The game crashes with the error message “ExecutionEngineException: Attempting to JIT compile method ‘SometType`1:.ctor ()’ while running with --aot-only.”
The Mono .NET implementation for iOS is based on AOT (ahead of time compilation to native code) technology, which has its limitations. It compiles only those generic type methods (where a value type is used as a generic parameter) which are explicitly used by other code. When such methods are used only via reflection or from native code (ie, the serialization system) then they get skipped during AOT compilation. The AOT compiler can be hinted to include code by adding a dummy method somewhere in the script code. This can refer to the missing methods and so get them compiled ahead of time.

The dummy method looks a little tricky to implement as these are event related methods ex:
Unhandled Exception: System.ExecutionEngineException: Attempting to JIT compile method ‘(wrapper managed-to-native) System.Threading.Interlocked:CompareExchange (System.EventHandler,System.EventHandler,System.EventHandler)’ while running with --aot-only.

What has Unity done to cause this to happen now when it was working fine before?
Will this be reverted to previous behavior or is this intended to be permanent?
How can I work around this?

It seems the only way around it is to have the source code instead of a dll in the plugins folder, but what if you don’t have the source just a dll? You are screwed!

ty!

Please try all the tips once again. Have you completely wiped out derived data folder content?

Are you using managed code stripping?
Unity 4.0 treats external Dll’s as libraries and they are now subject of stripping. Adding whole namespace of your library to the link.xml should help in most cases. If it doesn’t or you aren’t using code stripping, please submit a bug report. And post your case number.

Could you provide a link to the documentation on code stripping and link.xml usage? Afaik I’m not as I’m on Unity Pro + iOS basic and the stripping level is Disabled, and have not come across the link.xml before. ty!

Then it’s bug. Please provide Unity 3.5 project that works on 3.5 and doesn’t when imported to Unity 4.0.
Thanks!

Project is tricky, maybe I can create a test one with the dll in question. I’ll submit a bug anyway.
But according to “Disabled Managed code stripping is disabled” Unity - Scripting API: StrippingLevel it must be getting stripped even though disabled…so bugged!
I’d like Unity to leave it alone ty!

What about the Link.xml? Where do I find that to add the namespaces to see if that works?

Disabled is disabled. I believe it is something else.

kk Bug report submitted “(Case 504025) As reported in http://forum.unity3d.com/threads/159805-Unity

I believe that users of NData just encountered this http://forum.unity3d.com/threads/127918-NData-MVVM-framework-for-NGUI/page5 but the developers just released a fix with the source instead of a dll. That seems to be the only workaround at the moment, avoid the dll and use the source…but this is not feasible all the time for obvious reasons. ty!

Hi everybody.

I am not sure if I do repeat someone else finding but I got following thing today:

I had a fully working unity 3.5.6xx project —> I converted it to Unity4 and deployed it to my iPhone
following things happened:

NOTE: The project played from the editor just fine (but not from the deployment on actual device).

it lost 1 animation linking (minor and could be fixed easily)
it DID NOT play my animations that I was controlling from my scripts (really a bugger)
it interpreted accelerator value from the iPhone so that it only moved right on one of my scenes (a bugger too)
it also give me a nice crash on one my scene that did not happen in the deployement from the older version

I had updated my xCode and I had cleaned my iPhone from the old deployement and I had also build the whole
thingy again (not appending to it to anywhere).

For me it seems that there is something quite dramatic happening when converting the guy from old to new,
any ideas?

(Since I installed unity3d 3.5.6xxx back and deployed, everything was working)

Lost links / not playing animations after upgrade are cases which we are trying to fix with upcoming minor release, please submit your not-converted project as bug report and poke me with case number.

With Unity 4.0 mobile sensor input got better alignment between platforms, which means you can write less code when handling typical input on mobile platforms. Now acceleration and gyro input will follow screen orientation in the same way both on iOS and Android platforms. To take advantage of this change you should refactor your input code and remove platform and screen orientation specific code when handling acceleration and gyro input. You still can get old behavior on iOS by setting Input.compensateSensors to false.

Not sure about crashes, they might be outcome of other changes that require slight code refactoring : http://docs.unity3d.com/Documentation/Manual/UpgradeGuide3540.html

Is the fact that a shuriken particle effect with a scale different than 1,1,1 that goes offscreen immediately disappears a known issue? E.g. if the origin point of a smoke trail goes offscreen, the whole smoke trail disappears.

I’ve seen a couple of people with this issue in answers.unity3d.com, so I’d like to know whether this is known or not before submitting a bug report.

Does it behave as you expect when scale is uniform?

I am using Unity 3.5 and iOS Basic and also running into JIT exception on event code, in the case where the event is in a separate DLL. This is a real problem because the workaround of invoking the method manually to ensure it gets AOT’ed doesn’t work.

I was hoping for a quick port of my .NET game to Unity, but if this is broken in both Unity 3.5 and 4.0 (and somehow for some people new things are broken in 4.0), that may deter me from my plans to use Unity.

There is an older thread here, with no real answers:
http://forum.unity3d.com/threads/113750-ExecutionEngineException-on-iOS-only

I asked the Mono developer who works on the AOT code (Zoltan Varga), since it looks like he fixed this very problem in 2008 (or perhaps another one with the same symptoms), as mentioned in the above thread, and he said to ask the Unity people what’s going on. (I see many branches of mono on Unity’s github area… which ones are used for 3.5.x and 4.0 releases? It looks like most branches use more recent code than 2008.)

I have been working on a project for the direct x 11 competition. My computer is 100 percent dx11 compatible. My video card drivers are fully up to date(GeForce GTX 550 Ti).

Unity crashes very often when DX11 is active. Most of the time it happens when I try to move scene or a game window. I have already submitted a bug report for this.

Its been very difficult working on the project with Unity crashing so much. If anyone has any solutions I am open ears. :slight_smile:

Have you got commit hash, which fixes this issue? So far I’m aware that such issue happens only when external DLLs are compiled using Visual Studio. Recompiling them with Mono / Monodevelop fixes the issue.

Please report a bug for these crashes.
Thanks!

I did. I was just wondering if anyone was having the same issues. And if there are any solutions. :slight_smile:

What’s your case number? If you haven’t received response yet I could bump it.