- Home /
How have a script library outside of projects?
What is the best way to organize scripts across projects with Unity? This would ensure that all projects are working on the most recent version of the script.
I've been using unity for a while now and have tons of projects. I find myself either forgetting about scripts I've already written or don't remember which projects they were in. I try and copy the new scripts over to a library folder outside of the projects, but then I'll update a script in the project and forget to update it in the library folder. I'm used to keeping a c++ library where I can have all projects reference the same file.
If this just isn't possible in Unity, do you guys have any tips on how you keep your scripts straight?
I am working on the same issue now. It would be great to hear how you got around it. I see some solutions using source control but i don't know how to set it up with Git.
Answer by MorphingDragon · Jun 30, 2013 at 01:07 PM
Because Unity manages its resources at the file system level you could use a symbolic link/junction and have the projects link to a common folder. This would be a good option if you don't have source control. There is a warning though, if you delete the hard link you delete the contents of the common folder. You'll have to use the command line again to unlink the folder in the project if you want to remove it.
Windows: http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/
Mac OSX: hlink
Thanks! Really easy to set up. I sometimes work from a mac which may be an issue but this seems good for now. Not my question so unfortunately i cant mark it as correct but you get my vote! ;)