WooshiiDev / HierarchyDecorator

Lightweight Unity Plugin transforming the Hierarchy into what it should be. Adds headers, styles, icons and more.
MIT License
1.04k stars 50 forks source link

Fix Repository Structure for package manager installation, OpenUPM etc #10

Closed WooshiiDev closed 3 years ago

WooshiiDev commented 4 years ago

Unity will not allow git importing of the package due to the repository being structured wrong.

https://i.imgur.com/BIgxrVw.png

MostHated commented 4 years ago

Just a quick note/question on this. I went to start a new project today and install the asset from OpenUPM and noticed that it said it was version 1.0.2 from 18 days ago but looking at commits, I see there have been a number of them since. I am guessing that at the moment it's probably best to just pull down the most current files and use them over the current OpenUPM build?

I have been looking into getting some of my own repos set up to be used as packages and while doing so I came across this and thought I would share it with you: https://github.com/marketplace/actions/create-unitypackage Not sure if it might help ease some work on your end, but it should be able to take your committed Unity project and then using GitHub CI/CD Actions, create a ready-to-go *.unitypackage file for you from your latest commit.

I didn't look much into that particular one to see if it did it automatically, but I know Actions can be configured to automatically tag releases for you and do whatever other little things here and there that UPM/OpenUPM might require. Then you don't have to worry about it yourself, you can just commit your changes and let GitHub do the rest for you.

WooshiiDev commented 4 years ago

Ah hello my man, hope you are doing well 👋

Yeah, I actually thought UPM automatically updated their package version but if it doesn't that's on me due to either needing to fix the package structure for unity/github in general or I just need to manually push changes to it.

I apologize for the lack of updates within the last few weeks, been working on internal stuff with my main team and will be taking this weekend to dedicate myself to this.

Yeah I have a release version here (0.4.6) but someone did make a pull request to add buttons to the icon tab so all components can be enabled/disabled (I swear I added it myself previously, but apparently I never and I have no idea what happened if I'm honest) so you could take the most recent.

Regarding the package update, I'm so happy you sent me that. That's such a good idea to make it automated. I assumed in my head I could do that with Actions, but I never looked into it. Fantastic and I will have a look into it, thank you.

My commit structure needs improved as I'm too quick to push and it looks bad on the commit list and just general structure so I'll be taking more time into commits from now on.

MostHated commented 4 years ago

No worries about updates. I have been using it for a few weeks now with no major issues or anything I can think of. Also, sorry it took a bit to get back to you. I have bad ADHD and without my Adderall I can't even look at code or pay attention long enough to do anything productive, so when the pharmacy messes up my scripts it is bad news. They just filled it today, so now I have a lot to catch up on, lol.

And no worries, the Actions seemed like something that was too useful not to share, lol. I am also with you on the commits. It's only been the last year or so I really started trying to heavily use Git/Github, so I still often find myself either committing way too much, or way too little. I need to find that happy medium of the push being useful enough, but not so infrequently that it becomes hazardous from a backup/disaster recovery standpoint.

WooshiiDev commented 4 years ago

The git url should now work for unity! I just need to check OpenUPM now and see what the situation there is

MostHated commented 4 years ago

Good deal. 👍 I spent some time figuring everything out myself to use OpenUPM and what not and the main thing for there is going by version tags of the repo. I came across an awesome Unity specific tool called ubump.

Esentailly, all you have to do is run npx ubump (or install it) from your repo and it downloads and runs it. What it does is first, sync up your version/release numbers for you, and also automatically bumps the package.json version, then also lets you select if you want to create a Github release tag with the same version number. That's all you have to do. So you just do your commits however you want, then when they are in a place that you want to call "ready" for a new version, you run ubump, up the version, it creates the tag, then OpenUPM will automatically pick that up and update on their end.

WooshiiDev commented 3 years ago

Hey there MostHated, not sure if you'll see this, but it's a response that's taken too long.

Pulling from git now works, and for UPM I'll be sorting that out in the next few days. Things have been busy and getting time to work on this was quite inconsistent. I've added a new release and everything should work in 2018.4 and 2019.X even when adding the package through a Git URL in the Package Manager.

WooshiiDev commented 3 years ago

OpenUPM is working 🙂

I thought I would have had to do more due to package issues in the past due to my previously poor maintainence on the package.json but it's been sorted.

You can see here [OpenUPM] for more information!

If there's any follow up issues please feel free to give me a ping 👏 Wooshii