Assets/_Scripts/Vehicles.js(1,1): BCE0021: Namespace ‘System.Collections’ not found, maybe you forgot to add an assembly reference?
These are the only errors, and they seem to apply to every Unity script file in our project. I’m sure it’s something really simple, but I’ve searched these forums, Google, and the Unity Answers to no avail on how to deal with this error. Obviously it wasn’t a problem on Unity iPhone 1.7. Thanks in advance for any pointers.
Nope, we don’t have any DLLs added. Aside from our mostly Unity script files (and a handful of C# files), our project only uses SpriteUI and a few other included Unity script or C# files which are located in the “plugins” folder. It compiles fine under iPhone 1.7, but emits these errors when I try to import those files from the old asset server (I don’t think Unity 3 has an updated asset server). Should I try to import the game as a package instead?
Here are some of the other errors:
Assets/_Scripts/MassTrajectory.js(1,1): BCE0021: Namespace ‘System.Collections’ not found, maybe you forgot to add an assembly reference?
Assets/_Scripts/MissileTrajectory.js(1,1): BCE0021: Namespace ‘System.Collections’ not found, maybe you forgot to add an assembly reference?
Assets/_Scripts/GameManager.js(8,8): BCE0021: Namespace ‘System.IO’ not found, maybe you forgot to add an assembly reference?
Assets/_Scripts/ProgramManager.js(4,8): BCE0021: Namespace ‘System.Xml.Serialization’ not found, maybe you forgot to add an assembly reference?
Assets/_Scripts/u.js(5,8): BCE0021: Namespace ‘System.Text’ not found, maybe you forgot to add an assembly reference?
Though the platform was auto-set to “iPhone, iPod Touch, iPad” after downloading from the asset server, I also clicked on “Switch Platform” just to be sure. The errors stayed the same regardless. I also tried switching to Android and the errors were still there (albeit with one additional Android error of some kind).
Also, if I remove any “using” lines, Unity3 continues to complain about not finding System.Collections, which I presume is somehow implied.
This is an imported project from Unity iPhone 1.7 - could there be options messed up in the conversion?
And speaking of conversions, Unity3 spends an awful lot of time converting the project each time I open it. Is something keeping it from finishing somehow so that it has to start all over again?
I figured out my problem. There was a class called “System”, which obviously conflicts with the .net namespace. Interesting that it was allowed before on iPhone 1.7 though…
if you were on iphone basic, then yes, cause as iphone basic licensee system was always cut independent of you wanting it (filesize exceeded the max linkable size otherwise)