First of all in .NET / Mono you can’t “include” other classes. “using” is just a shortcut. It tells the compiler when it can’t find a certain class in the current namespace to look in those given by the using statement.
You can always write the full classname without the help of any “using”(C#) / “import”(UnityScript).
In UnityScript(Javascript) the compiler includes the UnityEngine namespace by default, so all runtime classes that comes with Unity are available. System.Collections contains some helper classes like List, Hashtable,… If you don’t use any of those classes you don’t need to include that namespace. However, as i said you can always use the full path to use a class from another namespace.
Instead of including the “System.Collections.Generic” namespace to use the List.<> class you can also write:
var myList : System.Collections.Generic.List.<String>;
myList = new System.Collections.Generic.List.<String>();
using / import are just helpers to shorten the classnames.
Your second warning about “UnityEditor” also tells me that you included the UnityEditor namespace. Keep in mind that the classes defined in UnityEditor are not part of the engine and should only by used in editor-scripts, otherwise you can’t build your project.
thank u for ur reply i understand that by default required namespaces would be included but on my pc i'm getting whole host of errors for some reason please go to the following image link: http://i54.tinypic.com/al3z4m.jpg please suggest what i should do
thank u for ur reply i understand that by default required namespaces would be included but on my pc i'm getting whole host of errors for some reason please go to the following image link: http://i54.tinypic.com/al3z4m.jpg please suggest what i should do
– anon91748615i've tried reimporting the whole project but still the same problem but how do i force a solution sync?
– anon91748615Just right-click anywhere in the project-panel and select the last item: "Sync MonoDevelop Project"
– Bunny83oh! that didn't help either
– anon91748615Did you solved the problem? How did you created your .js files ?
– AntonyBaasan