Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compartible with Unity Package Manager #2

Open
WazWaz opened this issue Jul 11, 2023 · 7 comments
Open

Not compartible with Unity Package Manager #2

WazWaz opened this issue Jul 11, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@WazWaz
Copy link

WazWaz commented Jul 11, 2023

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

Do you prefer patches or pull requests from forks?

@Nickk888SAMP
Copy link
Owner

Send me a Pull Request 👍

@WazWaz
Copy link
Author

WazWaz commented Jul 11, 2023

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
Copy link
Owner

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
Copy link
Author

WazWaz commented Jul 12, 2023

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
Copy link
Owner

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
Copy link
Author

WazWaz commented Jul 13, 2023

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
Copy link
Owner

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

@Nickk888SAMP Nickk888SAMP added the enhancement New feature or request label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants