Calling Javascript Method fron C# NGUI

Call a method at the start of the application/game to initialize all my static variables. I have a class called as MyClass.js which has

static function MyFirstCall()
    /* Game specific Initialization */
    return myString;

I am using NGUI for my first screen. How do I call this method in MyClass.js from FirstScreen? Currently I am trying to call this in UICamera.cs Awake() method.

Javascript file is under Plugins while NGUI Scripts are under Plugins->NGUI.

Any help would be appreciated.

C# and JavaScript classes can’t normally communicate with each other, except if one of them is compiled before the other – see Unity’s script reference page on compilation order. So, you could put one script in the early pass, and another script in the late pass; the script in the late pass will then be able to access fields and methods in the other.

Simpler option: use SendMessage() if you can get away with it.