So I made a new template and was wondering should the entire project for that template be contained within the Assets folder?
I have my projects in a projects folder that is in the same folder as my Assets/Project Settings/Library etc so it isnāt inside Assets.
Following the guide:
https://engine.needle.tools/docs/html.html#vue-react-mustache-etc
- I did the right click > Create/Needle Engine/Project Template to make a template
- I then copied one of the basically empty projects from my āprojectsā folder to Assets/Templates
- I then moved that Project Template asset into that folder
- Now unity gives me a tonne of errors that type
Type 'MyComponent' already defines a member called 'myMethod' with the same parameter types
which is probably because the project is in Assets folder.
What am I doing wrong here? The guidance in the docs is a bit vague
Original Post on Discord
by user 103054507105067008
First of all dont ever copy a ānode_modulesā folder inside Unity
youāll never ever need that.
Could you show the full error? If you get compiler errors its most likely not related to the template structure or creating a template but some other error in your project
Errors went away when I deleted the node_modules folder from the project I copied
by user 103054507105067008
Seems like āMyComponent.csā exists in multiple folders now?
Maybe because of a symdir within node_modules
I wasnāt sure as I thought I saw some samples or example project where the actual āprojectā was inside the assets folder a long time ago so wasnāt sure
by user 103054507105067008
node_modules
are generated when you install the npm package. You never want that in Unity directly and it easily crashes Unity depending on your project size / dependency count since npm packages can pull in a lot of files
Not sure what you mean - that was never the case for templates at least ^^
I think Iāve got the template working now
by user 103054507105067008
same with projects with node_modules - if that ever happened it would be a big big issue 
Great! Basically theyāre just a marker for copying a folder recursively
thats why last time putting it inside assets was a problem 
I added some checks since then to make sure huge copies like that dont happen anymore 
All sorted, dw if I ask silly questions like these itās because I searched up what I was doing first here due to the getting started guide on it I linked being a bit vague due to being under construction. Thought Iād document what I first did, what the errors were and what I did to get it all setup and working as a template 
by user 103054507105067008
I think for some of the people at my work I want to have using Needle hopefully early next year, they are not as technical as me so they would definitely do something like copy an existing project with node_modules folder into Assets to be a template as they wouldnāt know that is wrong to do
by user 103054507105067008
Would be super cool to have some way to generate a template from an existing project similar to the export scene as zip option one day to avoid that 
by user 103054507105067008