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
#pragma strictat the top of
- 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.