PS4 Exceptions on LockFreeStack

Hiya,

Just wanted to ask about PS4 compatibility.
When running on device the pro pathfinding throws:

System.ExecutionEngineException: Attempting to JIT compile method System.Threading.Interlocked:Exchange

I am able to suppress this issue by adding UNITY_PS4 tags where the UNITY_IPHONE cases are handled. Just curious if there are any other platform issues that I should look out for besides the LockFreeStack.cs thanks!

also: S.O. suggests a fix by way of creating a dummy in the constructor:
var dummy = System.Threading.Interlocked.Exchange( ref dummyTask, System.Threading.Tasks.Task.Factory.StartNew (() =>{}));

however, this doesn’t seem to work with the .net version Unity is currently running

Hi

Thanks for the bug report.
The Unity docs are a bit annoying because they don’t list every platform flag: http://docs.unity3d.com/Manual/PlatformDependentCompilation.html

I have added PS4 (and PS3) flags to that code now.

I recently had a user which built for the PS Vita do the same changes, and that user seems to have got it working perfectly after just those changes, so PS4 will probably also work.