This seems pretty straightforward but thus far I haven't found any info regarding this issue. Say I have the following code:
mergeInto(LibraryManager.library, { Example: function (){ // Do some things var thing = CodeToCall(); }, CodeToCall: function (){ return 10; } });
Though it compiles and I can run my game over the web, whenever my C# code makes a call to Example, it executes the function, but then says that CodeToCall is not defined as a function. This is my first foray into implementing Javascript into my game so that I can interact with the page, so there may be something vital that I didn't realize I needed to do.
Any insight is appreciated!
mergeInto(LibraryManager.library, { Example: function (){ // Do some things var thing = CodeToCall(); }, CodeToCall: function (){ return 10; } });
Though it compiles and I can run my game over the web, whenever my C# code makes a call to Example, it executes the function, but then says that CodeToCall is not defined as a function. This is my first foray into implementing Javascript into my game so that I can interact with the page, so there may be something vital that I didn't realize I needed to do.
Any insight is appreciated!