ialex32x / unity-jsb

It brings Javascript runtime capability to Unity3D by integrating QuickJS.
MIT License
337 stars 41 forks source link

How to add to existing project? #35

Closed jeremywho closed 3 years ago

jeremywho commented 3 years ago

Hi!

I'm wondering how I can add this to an existing project? It's not clear to me exactly what should be added and what is example code.

ialex32x commented 3 years ago

Hi jeremywho, just copy the Assets/jsb directory to your project, and you could remove Assets/jsb/Extra directory (or any subdir in it) if you don't need these features. Then, write a startup script like Sample.cs to create the script engine and run its mainloop.

jeremywho commented 3 years ago

Thank-you!