- Home /
Developing for iOs (is there a certain syntax?)
Is there a certain cyntax for developing on iOS? Thank you.
Answer by save · Aug 01, 2012 at 08:17 PM
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.
Your answer
Follow this Question
Related Questions
Simultaneous Android and iOS development 1 Answer
Build and test iOS games without License 1 Answer
Very confused at what I should do 0 Answers
Similar Game Development like Subway Surfers 2 Answers
unity 4 and ios confusion. Help!!! 0 Answers