Hi chaps, I have been working with Unity for a few months now and I have been developing an iphone app mainly on PC and then occasionally transferring across to mac. This has been a process fraught with problems which it would be great to address at some point in future Unity updates. Here are the issues I’ve had including the slightly annoying to the down right frustrating…
1-OnMouseUp,OnMouseDown,OnMouseDrag etc are all unrecognised on the iphne which instead uses the iPhoneInput.GetTouch(0)or iPhoneTouchPhase.Moved (for dragging). This means i need to comment/uncomment large blocks of code whenever I wish to test on pc/mac. Could we not have a method by which unity iphone automatically converts the mouse inputs to touches?
2-Strange GUI discrepancies. Potentially bugs in my own code at this stage but many of my buttons that work fine on pc dont work on iphone and vice versa. I suspect this may have something to do with the code I have written to compensate for the above (point 1).
3.-Project incompatabilty messages. Everytime I switch from iphone to pc or vice versa I recieve a message saying that I am risking data loss. When I get this message I feel that I am doing something bad …but I’m innocent I tell you!
4-Differences in unity iphone to standard unity layout/interface. Things like not being able to drag a variable in the inspector left or right to alter them (very annoying for positioning) or being able to view the settings easily. The pc version has all of this so why not Unity iphone? Oh…and the alt key on the pc is great for fine tuning placement of objects but on the mac this is a camera controller.
Anyway, hopefully this will give anyone planning development with a dual setup an insight into the problems you are about to face. Enjoy!
Btw…the main reason I use a pc for the majority of development is that I only have a macbook and its a pain in the backside to work on, although I am starting to question which method of development is more painful…
Well, the core issue is that Apple has limited the development of XCode projects to their own operating system. It’s not really up to Unity Technologies.
The problems you’re running in to are exactly why I always recommend people not develop an iPhone app on a PC.
Because Unity iPhone is based on Unity 2.1, not Unity 2.5. Eventually the plan is to merge the two, so it will probably be somewhat less painful trying to develop iPhone apps on a PC. However it will always be at least kind of painful because of not having XCode, so you might as well just do it on the Mac and save yourself the bother.
Then, use general functions for input, like Input_IsUp() that then has specific code for each device, using the above. Then just call Input_IsUp() in your main code and the proper code will be compiled based on what device you are deploying to.
I use this awesome bit of code from besuser (The very clever person making the GUIManager stuff) I made a very small addition of the accelerometer support which probably doesnt work very well but it also means I can dev on a pc then move back and forth (sort of)
Put it in a Plugins directory
you still need to convert / re import the images and all that jazz as well.
Should I say “yes it is”? Just have a look at our public roadmap. It is still more or less true. Also you have an opportunity to compare, what was promised to what was done. :twisted:
i’m trying to get any of the iPhone sample project running on Unity 2.6
is there any way you can share your project that works both on PC and iPhone (with the interfacecode duality remarking thing…)
iPhone Samples won’t run on anything but Unity iPhone as the required classes for input, settings and occlusion culling are Unity iPhone exclusive and Unity 2.6 projects can not be loaded with Unity iPhone
If you could develop on the PC for the iPhone it would be awesome. I have a mac for iPhone work but my powerful rig is a PC. What would be especially cool would be a way to remote compile for the xcode pieces.
For now I create all of my assets on the PC and move them over via the network. The mac I have is slow in comparison and it has some odd key-shortcuts I’m not used to but it does get the job done. I’d probably consider a more powerful mac but then I’d have to buy all my software again (Photoshop CS3, Vue 6, etc.) Not to mention I don’t think 3DSMAX even runs on OSX.
@Lostlogic: If you got a more powerful Mac, you could get something like VMware Fusion, and run Windows as a virtual machine inside of Mac OS X. I actually do this exclusively now, as I still have to do some Windows projects that require Visual Studio. It won’t be as fast as natively running Windows, but it can certainly work decently. I’m currently running Windows 7 at all times in the background so it’s there when I need it and hidden when I don’t. I’d recommend trying out VMware first before going this route, just to see if you get the performance you need out of it.
It’s unfortunate you can’t do the reverse (run OS X in a VM on Windows), but that’s how it goes.
Yeah, I just can’t justify it. I’m still at a negative $ amount for my Mac projects and the PC generates positive revenue with the projects I do on it. I’m also a huge gamer and VM just doesn’t hack it when it comes to that kind of graphics power (that I require at least). Maybe this next project will break that trend though.