- Home /
Is it possible to switch off forced strong typing for ios/android?
Unity forces #pragma strict in Javascript when I target it for mobile platforms. Can I switch it off? Performance is not a problem because my game has text-based graphics.
Answer by tanoshimi · Apr 29, 2014 at 04:53 PM
Mobile devices don't allow dynamic type inference, which is why Unity forces you to use #pragma strict to force strong typing. No, you can't switch it off (though personally I don't understand why anyone would want to)
Answer by Dameon_ · Apr 29, 2014 at 07:23 PM
Read this link:
You'll notice it says that #pragma strict is REQUIRED for iOS development. Strong typing is good programming practice, regardless. Javascript may be flexible about typing, but just about any other language will get angry at you over it. Odds are, what you need to do can be done with strong typing.
Your answer
Follow this Question
Related Questions
object pooling on mobile 1 Answer
Improving Lensflare Performance on HoloLens 0 Answers
Multitouch with two Different Scripts 0 Answers
WebGl on UC Browser 1 Answer