Ciao,
I have created (well i copyed it from a tutorial to be honest) a
public class FileLoader : MonoBehaviour
and i put that in the Standard Assets folder as it should get compiled before other assets.
then in my javascript game script i try to load it as follows:
var _fileloader:GameObject;
function Start()
{
fl=Instantiate(_fileloader);
loader=fl.GetComponent(FileLoader);
loader.LoadFile("Data.txt");
}
Unfortunately the js won’t compile as it says
Assets/Scripts/GameScript.js(6,32): BCE0005: Unknown identifier: ‘FileLoader’.
Any idea why this happens?