Developing for iOs (is there a certain syntax?)

Is there a certain cyntax for developing on iOS? Thank you.

The syntax is the same as developing for any other platform. There’s still Boo, UnityScript and C# to choose from as this compiles to Xcode when building for iOS.

Although, there’s a couple of good practices when you script for mobile devices,

  • Use static typing (force this by
    using #pragma strict at the top of
    your documents).
  • Cache all components (even transforms) by making variables that reference to them.
  • When working with arrays try to use the built-in ones as much as possible.
  • InvokeRepeating() is often to the rescue for repeated functions.
  • Reuse your objects, try to never instantiate or destroy during a scene.
  • If possible (and/or in need) garbage collect often.

Read more here.

You also have a couple of platform specific classes and functions, such as Input.touches, iPhone and the Gyroscope. There’s also a platform dependent compilation code that can be of great use.