unity3d - How to call C# function from UnityScript -


I want to call this type of C # function from Unity Script GameMaster.js .

GameMaster.js
  Start #pragma Strict Function () {print (mahjong.Foo ()); }   

mahjong cs
  By using the system. Selection; Public square mahjong {string fu () {return "foo"; }}   

When I run the program, I get the BCE0005: unknown identifier: 'mahjong'. . According to the information from, if the script files are in the property directory, then I do not need the import file.

But it does not work in my case. What am I missing? How do I call the #C function from Unity Script?

The C # script is compiled before the JS script; You have to transfer the C # script to one of the following directories: Plugins, Standard Assets or Pro Standard Assets.

It works in another way - if you want to call JS from C #, move JS to one of the folders.

It does not work in both ways at once.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -