- Home /
Coding in Visual C# Express - Using C# and Javascript namespace problem
Hi,
ive tested coding in MS Visual C# Express Edition. Now ive opened an old project where im using javascript and c# script-files. In my "MainController.cs" im using something like this to work with javascript files like the "RotateAroundObject"-file:
rotateAroundObject = (RotateAroundObject) orbitcam.GetComponent(typeof(RotateAroundObject));
Ive searched the forum and also unityanswer and found that i have to switch all my javascript-files into the "Standard Assets"-folder. Tested it but it wont work. I get the following console-message:
Assets/Standard Assets/Scripts/MainController.cs(13,13): error CS0246: The type or namespace name `RotateAroundObject' could not be found. Are you missing a using directive or an assembly reference?
Can someone help me? Any hints? Thanks for your time... yosh
Answer by Michael La Voie · Mar 16, 2010 at 05:50 PM
Hey Yosh,
This looks like the same issue you reported in your other question. C# cannot read UnityScript files. They can coexist in a project just so long as they don't need to reference each other as you tried there. You'll have to convert the JS to C# or the other way around.