-
Notifications
You must be signed in to change notification settings - Fork 274
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
upm support #24
Comments
Oh! That's quite cool! I never heard of it. |
Yeah I recently discovered it as well, I will see what I can do. |
Alright so here are my current results: The UPM branch is orphan. It is created by But instead of leaving the split UPM branch as is, I soft reset to the first commit and squashed everything by amending the commit. This yielded a prettier result in my opinion. UPM branch: https://github.com/starikcetin/Extenject/tree/upm The problem is, all the other tags are showing up at the version select list, which are not compatible: The reason they are not compatible is that, the UpmGitExtension plugin requires the package.json to be at the repository root, but we cannot just put it in there since we need to only publish the Plugins/Zenject folder as the package. This is not a huge deal of course, since it rejects you from importing incompatible versions (i.e. when it cannot find the package.json at the repo root). But I think we should find a better way. Maybe we can maintain a separate repository just for the UPM releases? Or, maybe we can implement some tag-filtering mechanism in the UpmGitExtension plugin itself, so that it only shows compatible tags. I looked at it for a while but the code seems very complicated. |
Alright, can you give me an orphan branch named "upm" here so I can send a pull request @svermeulen ? |
Hi @starikcetin I released UpmGitExtension v1.0.0 with tag filter support. |
you know what? you are amazing. :) |
@starikcetin Thanks for your contribution! It's much appreciated. UPM is an awesome thing for the future. However it's still in beta... If you've watched the Unite's Copenhagen there's a lot of new features coming to UPM. Like Asset Store Support, better Git support, etc. But the Package Developer tool is still not available. The ultimate goal would be to have Zenject/Extenject in the UPM itself. And how cool would it be to have it in the Packages folder! I am happy to create an UPM branch. But before that... could you enlighten me a bit more?
Don't want to be a pain but just want to get these stuff clear ;) |
Btw the package validator gives an error:
|
Just wanna chime in that I was able to install Extenject from |
hey, you can just use |
@Mathijs-Bakker I'll write a detailed response when I get the chance. I've been very busy lately. But shortly, UPM is much better than any other asset sharing method I've used (and I used quite a lot of them). It keeps the assets folder clean of third party imports, provides version based updates with the click of a button, and it supports dependencies! |
@Mathijs-Bakker
No, the plugin installs into a Package/Extenject directory. Since the plugin name is pulled from the package defintion this becomes the new diretory name. Also Unity handles upm packages differently and stores them outside the "Assets" directory.
The package manager does by default not show existing third party projects. Users will need to add the link by themselves.
Yes. I in fact did this via GitHub actions. The workflow implemented on my fork creates a new commit on an orphan upm branch and tags it with a separate upm version tag once a new version tag with the existing semantic versioning theme is pushed to the repo. This approach sadly discards any history as it creates an orphan branch and also creates the need to create separate upm tags but eliminates the need for a second repository compared to the subtree approach.
If you just specify a branch it will always get the head version of that branch. If you use the upm-extension by @mob-sakai it should be able to detect the most recent version.
As previously stated to use the ui you pretty much should use the upm-extension. Please feel free to correct me if i missed something @starikcetin :) |
Hi @umfahrem However. UPM should be supported. And actually I have a Zenject UPM version locally. Following Unity's package development recommendations.
There are still some issues on Unity's side. Because they are still developing their UPM support. There's still something with the dependencies field in the package.js manifesto. The last months of 2019 have been very busy for me to catch up with a lot of things. And this is one of them. I will see if I can get to it to push the local packages to the according tree. Meanwhile just keep using the @starikcetin one. |
I tried the upm package from @starikcetin but I keep getting spammed with the following warning:
|
Note these warnings are usually printed only once if the code is inside your project but in upm packages they keep getting printed over and over. |
Yes you right! that's annoying. |
@Mathijs-Bakker I can't, issues are disabled there, and he is not responding |
That's bad. However... did you tried to delete the .meta file? |
Hey, sorry I have been very busy with work and school lately. I will look into it when I get the chance. @paulpach |
@starikcetin Thank you for also pushing it to openupm :) |
Getting 2 warnings when installing (via openupm) and every time Unity re-focuses:
|
@starikcetin any progress? that warning is so obnoxious |
@starikcetin looks good to me |
Another issue I have related to UPM: I cannot use But I cannot use Can somebody confirm that this is not possible as of right now? |
I can confirm that this is not related to Extenject. Unity generates wrong My references land inside |
Maybe a dumb question: But does adding Zenject-usage.dll to the assembly refs help? |
@Mathijs-Bakker seems to be (another) internal bug in Unity. It's related to "defineConstraints": [
"UNITY_INCLUDE_TESTS"
], if this is not set the dll references work fine. I opened an issue at Unity (Case 1220959). Let's see how it goes..... |
So apparently Moq.dll (which I want to use) is not supported in play mode (?). |
You can use path query parameter from unity2019.3.4f1 and unity2020.1a21. Since package.json already exists, it can be set as follows. {
"dependencies": {
"com.svermeulen.extenject": "https://github.com/svermeulen/Extenject.git?path=/UnityProject/Assets/Plugins/Zenject",
...
}
} |
When Extenject is installed from Package Manager using path query parameter, the following sample scene cannot be opened. If you add a samples section to package.json like ShaderGraph, it will be expanded to Assets folder, but an error will occur because the script is duplicated. If you put sample projects in a hidden folder like Do you have an idea that both unitypackage and upm work? |
Hello, is there any chance to release it on OpenUPM to make package installation easier? Releasing it as a package makes updating 1000x easier and more reliable. I think Unity is also hosting a version of moq via UPM (I've seen it as a dependency in a tiny sample project recently) so adding dependencies like that could be done via UPM as well / OpenUPM |
Correct me if I am wrong but isn't there already OpenUPM support? Or is that another repo? |
Yes, it's a fork of Extenject, forked and maintained by starikcetin |
Is this still active? |
As I understand I would need to add OpenUPM with this solution, right? |
OpenUPM is external, it doesn't replace UPM. It is just a tool that automates what you would be doing manually. My fork is a little outdated however, I don't know when I would get the chance to update it, so be aware. |
Unity Package Installer would be a more suitable name.Unlike its name suggests wat it should do, Unity Package Manager (UPM) does not manage packages for you. At Unite 2019 in Copenhagen, the UPM dev team presented the upcoming UPM feats. and their package developer tool. Then it took just a few months before the UPM project was canceled by the board. There are no exact reasons given why this happened (to the outside world). But it has to do something with the fact that UPM would become a competitor of the Unity Asset Store. And Unity needs to make money somewhere. No other option than OpenUPMIf you want real package managing behavior, as auto update, revert back to earlier versions (tags) then OpenUPM is the only option. To be continuedStay tuned... |
Alright, then thanks for this info! |
upm can also be packaged in a tarball with for example |
@Mathijs-Bakker I think the name is somewhat suited. As people can't host packages that are natively supported by UPM, OpenUPM is a free registry users can (with some work involved) upload packages which are free for everybody. It is very sad that once again Unity is doing stuff very closed and not open to the public. |
What's the status of this? The install documentation hints at UPM being an option, but using that installs 9.2.0 whereas we're now at 9.3.1. |
After modest tree won the lawsuit and got control of this repo, they basically just changed the branding and stopped maintaining the repo. Instaling from @Mathijs-Bakker s maintained fork by git url seems like the best option https://github.com/Mathijs-Bakker/Extenject It's what I'm doing at least |
Ah, sorry. I thought I was in the fork :D |
Can we convert this into a UPM package to be used with https://github.com/mob-sakai/UpmGitExtension? I can do it for you if you don't have time.
The text was updated successfully, but these errors were encountered: