Ease of creating cross platform software?

If I develop something for the iPhone using unity, how easy is it to get it to compile for the web as well so the software can be used on both platforms.

I’ve already created my project using Obj-c and it works for the iphone but getting it to compile for the web will require me to complete re-write the code and ideally I’d like all my projects to compile for both.

Now, if I can create a project in Unity, and have it easily work for the web as well without re-writing code, then this is ideal for me. I’m wondering if this is possible. If so, I’ll most certainly convert start using Unity for everything I do :slight_smile:

Obviously you would need to re-do things that are iphone specific such as changing your accelerometer input to mouse input etc. Mostly though, reworking your app so it can be deployed as a webplayer should be a trivial exercise.

Welcome to the forums! :slight_smile:

The path from iPhone to desktop/web in Unity is the easier route, but both directions (thus including desktop/web to iPhone) are entirely possible. We cannot yet offer the true dream of author once, deploy anywhere, but we’ll get there. For now you do have to worry about the differences Quietus outlines above as well as the fact that your artwork may need dialing in for the target platform (the iPhone is a phone, as such it requires lower-rez artwork for example).

Thanks a lot for the quick replies guys. Yes that would be the dream, pure multi-platform!

Thankfully my program does not use accelerometer. Also, would both the iPhone code and Unity code be written in C#?

I also don’t need to worry about artwork just yet because what I’m creating right now is VERY simple. In fact I won’t even use any 3D models. In the future I plan make full use of Unity but for now my only purpose of using it would be the ease of going cross platform…

C# or JavaScript, your choice. I only mention JavaScript as in that case things can be different between Unity and Unity iPhone. Specifically JavaScript on the iPhone requires you to use strict compiling which is optional for desktop/web work. But for C# it’s all good!

Nice I’ve begun using C# and learning! Unity is pretty damn awesome I must say I can’t wait to start working on some games. So, looking at some example code as to how things are done, it seems I can just open up a project in Unity after creating it in Unity iPhone and it’ll just work…I mean I’m not using hi-res textures and I’m not using the accelerometer.

But seriously, I’m very excited to start working with Unity!!