How does Assets-Needle-Components.codegen handle changing between scenes in the project?

This is with scenes that have different ‘Project Folder’ directories on their Export Info component. I noticed that when switching between scenes and editing their respective projects, the Assets/Needle/Components.codegen folder didn’t update to show the components or scripts from the newly opened scene

Original Post on Discord

by user 103054507105067008

See here the project and scene open only has one script in it, but Assets/Needle/Components.codegen has scripts from the previously opened folder in it. It’s probably me doing something wrong tbf

by user 103054507105067008

Nope the folder is just generated and scripts in there wont be deleted or anything since if another project generated them. In the end if you open your previous project you would want those components to still exist, no?

Ah, it’s just not generating the new script I made then, that makes sense though

by user 103054507105067008

If you want to improve your structure and make it easier to re-use code and components I would suggest you start using npmdefs :slightly_smiling_face:

Had to add a random change to the newly made script and it generated it after, sometimes it doesn’t generate scripts until I do something like that anyway, cheers!

by user 103054507105067008

You can read about it here: Project Structure | Needle Engine Documentation