I want to call C# function from a UnityScript GameMaster.js like this.
GameMaster.js
#pragma strict
function Start () {
print(Mahjong.Foo());
}
Mahjong.cs
using System.Collections;
public class Mahjong {
string Foo () {
return "foo";
}
}
When I run the program, I get BCE0005: Unknown identifier: 'Mahjong'..
According to information from here, if script files are in Assets directory, I don't need to import file.
But it doesn't works in my case. what am I missing? How can I call #C's function from UnityScript?