I’m planning on buying Unity iPhone as soon as the dust settles with the new ToS. I just wanted to know if it would be possible to start development on my Windows machine and then export Unity Packages and then use Unity / Iphone on my Mac to produce the final app?
My Windows machine has better specs and I’m holding off buying a new Mac until later this year.
If this is possible, is there anything I should watch out for?
It’s possible, and you don’t have to export packages (just load the Unity project in Unity iPhone), but be sure you understand the iPhone hardware so you at least have an idea of what you can and can’t do (and the feature differences between Unity and Unity iPhone), and use #pragma strict on all Javascript files. Honestly you’d be better off just developing on the Mac; you don’t need monster specs for iPhone games.
I’m currently working on iPhone/pad games while trying to mainly use my windows machines. I think I’ve got it working ok at the moment.
I export packages across from my win 7 machine to the Mac. I like using the Pc because
I’m much more used to PCs
I’ve got two 22" monitors to work with
I use visual studio for an IDE (code editing)
Anyway, there are a few tricks.
Unity iPhone does not have dynamic typing, so sometimes some code that runs fine on PS Unity will fail on iPhone Unity. So if your coding style is loose with typing you’ll have to watch it. As Eric5h5 said, the #pragma strict thing will help for Unity Java script. For C#, the problem is much less pronounced, but I’ve hit problems doing some stuff with foreaches, but that might be more to do with generics.
Generics in Unity iPhone are not as comprehensive as normal unity. I’m sure someone can go into the details of the different Mono implementations but basically, some of the more complex generic collections don’t work. Plus they helpfully don’t work at run time as opposed to compile time.
List<> and Dictionary<> work, but their Sort() and AddRange() methods doesn’t.
Queue<> and most of the rest don’t work.
Oh, and the generic GetComponentsInChildren<> has problems too.
Not sure how you’re doing your coding, but the preprocessor # codes can come in handy.
ie.
public float GetSomeUserInput()
{
#if UNITY_IPHONE
// iPhoneTouch code goes here
#else
// Key press input code goes here
#endif
}
That code will now build and run on both Unity PC and Unity iPhone. It’s not perfect obviously, but it means you can test the majority of your game on the PC.
Plus if you’re using C# and Visual Studio, you can just create two visual studio project files, one that references the PC Unity libraries and one that references the iPhone Unity libraries. If you then define UNITY_IPHONE as a project wide directive on the iPhone project, only the right code will show up in the respective projects, and your intellisense will work properly for both… but if you’re not using VS then the above is probably gibberish
Then you should rethink your plan to do iphone development as macs don’t work like windows, xcode not like visual studio and the iphone not like winmobile yet you will be working indepth with all 3 and the earlier you learn stuff about it the less impacting a switch later on will be.
also without the possibility to test anything there is little use kind of as you can’t even test input code
You might be able to export the Xcode project, but you will need a Mac to actually build and test the game on an iOS device. Also you will need an account with Apple, accessible only from a Mac.