Hi there,
I am scripting for iOS and am recieving a GDB crash. I am not sure why. When I run the game in Unity there is no errorrs or warnings. I added in #pragma strict and recive in Monodevelope …
I am unsure what to make of these. Any help is appreciated.
You shouldn’t be including UnityEditor in scripts included in a build. Knowing how finicky the iOS build and deploy process is, that could be the issue right there.
Also, there’s an iOS specific section. 
sorry but I am not sure what you mean.
:.?
#include “System.Collections”
#include “UnityEditor”
Get rid of those
Hmm.
Touche killer1390.
Touche.
Away from computer. Hopefully it works.
What are these? The only thing different from a script that ran and mow is i added an array.
The point is - while the Warnings probably aren’t causing the application to crash, referencing things in the UnityEditor assembly outside of the editor will. UnityEditor isn’t included in any deployed build so while it will work in the Editor it will never work in a build.
To answer your question - adding using or import statements to your classes saves you the time of fully qualifying the classes you use. Since you mentioned Collections, here is an example.
using System.Collections.Generic;
public class ClassWithNameSpace {
private List<string> strings;
}
public class ClassWithoutNameSpace {
private System.Collections.Generic.List<string> strings;
}
The 2 are equivalent.
Ok, thanks KelsoMRK,
I think i get you, but certainly not fully. Specifically, by this line…
can you give me an example of something i may reference in the UnityEditor but am not outside?
It just strikes me as odd, while i get it, i can not think of anything that would fall under this scnario.
Currently i am thinking of vars i set via the inspector.
Thanks.
Sorry,
I originally misread. I thought you meant add them in.
I do not believe they are in existence, at least in none of my behaviors.
If its throwing up warnings then surely they are in there somewhere. Using any of these will cause issues. It could be, and I’m not sure, that simply referencing the assembly via a using/import statement will cause it as well. So the warning and the crash could be going hand-in-hand.