Hello all!
So basically the idea is to build some tools I would like to be totally independent from game code (and even to be sold in the asset store): e.g.: SQLite functionalty, math functions, etc. I have thought to build each tool as a managed dll that latter if I need in a project I just add the dll to the unity project’s corresponding plugin folder.
But maybe there’s a better way or you have any advice.
As for copying them into projects. I usually create a batch scripts. I have a batch script for “initializing” a project, which just lays out the needed files in a clean project and creates yet another ‘update’ batch script for easy one click updating. (this was in the ‘dll’ versions).
With unity asset packages, it actually deals with a lot of the stuff that these batch files did. And I can just “Import Package” instead.
The only big consideration between the 2 is if you plan to share. Dlls vs source code. Though of course the ‘asset package’ can contain dll’s (but of course now you have 2 layers of building the dll and then building the asset package).
You can setup packages locally and use them like packages in the package manager. This will also allow for easy release onto the asset store and allow customers to install via the package manager.
Yeah I just export packages too. I prefer not to use DLL’s primarily because I sometimes need to make a change to the package to accommodate the project in some manner, and turning my own code into a DLL makes that an unnecessary hassle.
i have two different project in unity with some common scripts in both project. Now in second project did some changes in those common script in implementation according to project functionalities. Now i want a common way to merge the changes i’ll make in first project are automatically comes in second project.
I want changes done originally in the second projects as it is and new changes i made in first project combine.
Try to use gits but both project are different so.
I’ve personally used a separate project for my common code and define a custom package inside it with a package.json. Though I host them privately on github and install them into my projects via a github URL. When I need to make an update, I open up the project, make the change, commit and push the changes on github, then other project can just update their Package Manager version. I don’t believe there’s a way to do auto-updates.