How to call javascript's function from c#?

This c# script exist in [Plugins] folder.

Then how to call javascript(in normal folder like [scripts])'s function or access that script’s variables?

Impossible?

You can probably call the JS function from C# if you use reflection. There is of course a performance penalty but maybe you can live with it.

so for this, I made JS’s update checking C#'s public bool or int value, first it works, but after I made 3~5 monitoring process, unity crashes.

Sounds like a leak or infinite loop. Could you encapsulate the buggy code and post it here so I can have a look?

You should really try to stick to one language.

I agree with @renman3000, but it is not always easy when using assets from Unity demos and asset store. Some scripts are easy to translate while other can take a while. Try converting The Island demo and you’ll see what I’m talking about. Reflection is not an optimal solution either but it gets the job done.

so I decide to use GameObject.SendMessage from C# to javascript’s gameobject.