Porting of game to different platform

Hi,

I am new to unity3d and has one quick question here. If I were to develop a web game in unity3d, how easy/difficult is it to port it to the mobile platforms like iOS/Android in future. Do I need to rewrite my code base?

Thanks in advance.

Cheers

you need to change only the controls

Wow… That sounds like mininal changes. Thanks. =)

Depends…if you used Javascript with dynamic typing, you have to change the code to get rid of all dynamic typing. If you used a Unity terrain, you have to remove it entirely and replace it with a standard mesh. If you used anything intensive (too high polygon count, too many objects, too much CPU time, complex shaders), you have to rewrite them to run well on a much more limited mobile environment.

–Eric

Thanks for the input, Eric. Does it mean it will be better to use c# if I have plans to do a port in future?

If you use “#pragma strict” in all JS scripts, dynamic typing won’t be an issue.

–Eric

Thanks for the tip. :slight_smile: