This is a demonstration of how the Jurassic JavaScript interpreter can be used inside Unity to evaluate JS at runtime. The JurassicExampleExecute script is the core of the project and contains commented code demonstrating how to:
• Instantiate an instance of the Jurassic engine.
• Expose .NET classes to JavaScript using
the "seamless .NET interop" feature.
• Expose .NET functions to JavaScript using delegates.
• Create a class that can be exposed to JavaScript by
inheriting from Jurassic.Library.ObjectInstance.
• Create a class that can be instantiated in JavaScript
with with a constructor using the "new" keyword.