C#与js之间的相互调用:
1、UnityScript and C# scripts are compiled into different assemblies. You need to put the C# in a folder called Plugins or Standard Assets and it will be accessible from the JS file
C#与js之间的相互调用:
1、UnityScript and C# scripts are compiled into different assemblies. You need to put the C# in a folder called Plugins or Standard Assets and it will be accessible from the JS file
Note that the scripts pu into Plugins or Standar Assets cannot use or reference scripts that are outside those folders.
Just to expand on the above : it is possible to use both languages, but they need to be organized into a specific folder that gets compiled before the other scripts. See point 3 in the first link regarding these folders : All scripts in "Standard Assets", "Pro Standard Assets" or "Plugins" are compiled first. i.e. If C# files are placed in one of the above mentioned folders, C# gets compiled before JS, JS can see C# but C# cannot see JS :
http://docs.unity3d.com/Documentation/ScriptReference/index.Script_compilation_28Advanced29.html => point 3
http://answers.unity3d.com/questions/208383/referencing-a-c-component-script-from-js-script.html
http://answers.unity3d.com/questions/243112/calling-c-classes-from-js.html