I am working on a project that will need to be deployed on multiple platforms (web, iOS, potentially Android). In Unity 2.6 and Unity iPhone 1.7 I’m running into a weird disconnect. Any scripts which reference iPhone functionality are creating compile errors in regular Unity.
I’ve tied to silo all my iPhone specific code as much as possible, but I just want Unity 2.6 to ignore it when I’m working on the web version. Short of waiting for Unity 3, which supposedly makes this problem go away with an integrated environment, is there a workaround for 2.6? Can I copy a DLL or something over from v1.7 of Unity iPhone?
use #if UNITY_IPHONE … #else#endifto encapsulate your iphone code.
that will solve it
You will need that anyway cause to be interesting on the iphone, your project must use native functionality in one or more way, be it only openfeint or something similar and to handle such stuff, above is the only reasonable way