Nickk888SAMP / RTSCameraController-Cinemachine

A RTS style Camera Controller for Unity 3D's Cinemachine system.
GNU General Public License v3.0
29 stars 5 forks source link

Not compartible with Unity Package Manager #2

Open WazWaz opened 12 months ago

WazWaz commented 12 months ago

I minimally fixed this, just to make it easier to integrate your changes.

Do you prefer patches or pull requests from forks?

Nickk888SAMP commented 12 months ago

Send me a Pull Request 👍

WazWaz commented 12 months ago

Ouch, adding all the Asset and Library etc. directories made this much more difficult to do.

Ideally, you'd have a test project that you use this is, via the UPM. That project could have all the Library etc, but the package for this would be as before (or rather, as before, but the code under a "Runtime" directory).

Nickk888SAMP commented 12 months ago

Yeah, one way is just to download the .unityassets file and import them manually which works just fine. But, of course it would be great to add the project to the Package Manager. I'll read about it on the internet to find a solution, maybe you could organize the files to somehow make the Package Manager understand which directories are the files or something, after that make a Pull request, but it also needs to work when cloning the whole repo to be able to open it in Unity.

WazWaz commented 12 months ago

It generally works the other way around with packages: people would install the RTSCameraController package (in an empty or existing project), which gives them the controller and probably the prefab, then optionally install "Samples" that are the examples you currently ship.

Using packages has a lot of advantages for developers using it - they don't need to check it into their project repository and can leave it as a reference, easily updating if it changes.

Nickk888SAMP commented 12 months ago

Yeah i see the advantages, but is there a way to make it work with one repo? I mean, i want the user to be able to download the source project and be able to add the project as a package to the package manager with the same repository. I know i need to make some Runtime directory and a manifest.json file and so on, but i would need to somehow combine/link the Asset directory to the Runtime directory or something like that. I have never done this before, is there a simple way to do this?

WazWaz commented 12 months ago

Possibly you could use 2 repos - the "RTSCameraCobtrollerDemo" repo would reference the package repo in its manifest. The user would only need to download that one Demo repo, and Unity would download the other automatically. Other users could just reference the package repo directly. The Samples would be duplicated though.

But it seems unnecessarily complicated compared to just giving installation instructions - I think anyone who's keen to write an RTS is capable of using the package manager and installing the Samples. I think it's better to help users to learn the "new way", which is packages.

Nickk888SAMP commented 12 months ago

Yeah, makes sense, i'll look into that.