Question

How can I use web workers from Script sharp?

Web workers need a source file, that will not compile in Script sharp because it is not a class, it's just code.

Ideas? Nikhilk?

Was it helpful?

Solution

In the latest stuff that is there on github, you can create an internal static class with just a static ctor, and mark the class as [ScriptModule] - it will generate top-level code. Think of this as main() for any particular script file.

Hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top