BLACKISH DEV BLOG Support
 

 

Unity: Calling C# functions from a JS script

In short: the C# script has to be compiled before the JS script for this to work. To achieve this you have to move the C# script into one of the following directories: Plugins, Standard Assets or Pro Standard Assets.

It also works the other way around – if you want to call JS from C#, move the JS into one of the folders.

It does not work both ways at once however.

More info about script compilation order can be found in the Unity docs here…

Bookmark the permalink. Follow any comments here with the RSS feed for this post. Trackbacks are closed, but you can post a comment.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>