Share Components

How can I share component code between projects?

Original Post on Discord

by user 553297758795333647

Hi, are you using Unity or Blender?

Unity

by user 553297758795333647

And with projects do you mean Unity projects or web projects (the ones referenced in /created with ExportInfo)

Between web projects

by user 553297758795333647

That are in one Unity project

by user 553297758795333647

Then you can create a npmdef and put your script(s) in there. You might need to restart the webserver if you add or remove them to the ExportInfo while it runs to make the server find them. See:

Another question just for completeness: which web project template are you using? The default one (vite)? Or another one?

The default vite

by user 553297758795333647

@Sinful Spartan did it work for you as described above?

Yes. That works great

by user 553297758795333647