Easily embed packages to your project with this extension

For all of you who want to modify packages with your custom code or fixes >now it’s easier with this extension.

Also available to import as a UPM package. Use this link**: GitHub - liortal53/upm-embed: Unity editor extension for easily embedding UPM packages in your project**

  • Right-click any package folder under Packages
  • Select “Embed Package”.
  • DONE - the package is now included in your project (under "Packages") and is fully editable.

Share with friends / teammates if this is helpful :slight_smile:

4 Likes

Let’s convert this into a UPM package and add it to Awesome UPM.

What do i need to do ?

Also, is a UPM package the best (easiest?) way to consume this? Or maybe the standard .unitypackage is better in this case ?

Take a look here: https://github.com/starikcetin/awesome-upm#how-to-support-upm-in-my-git-repository

Let me know if you need help.

I would take UPM over .unitypackage every day. It is much more convenient, and you don’t have to deal with deleting old left-over stuff when you want to update the package.

And the best of them all, Assets folder remains clean of any third-party files (well, most of them anyways).

@starikcetin done. need to add a proper README, but it’s ready i believe.

To use it, do i need to give you the URL with the actual tag postfix (e.g: version number) ? or how do people consume this via UPM?

They need to add this line to their manifest.json:

"upm-embed": "https://github.com/liortal53/upm-embed.git#0.1.0"

Or they can use this tool, which is much easier:
https://github.com/mob-sakai/UpmGitExtension

Great tool! Thank you.
There’s an error, which could be fixed by adding meta file probably:

Asset Packages/upm-embed/package.json has no meta file, but it’s in an immutable folder. The asset will be ignored.

I will look into that, thanks.

fixed

Looking good, thanks!

1 Like

I created the PR, I will merge it after testing: added upm-embed of @liortal53 by starikcetin · Pull Request #19 · starikcetin/awesome-upm · GitHub

Edit: Works like a charm. Merged. Thank you!

1 Like

Thank you :slight_smile: hopefully this helps someone(s) in our awesome community !

1 Like

This is an amazing extension. I am having an issue when the Embed Packages is grayed out… am I doing something wrong? It’s been a little while since I have gave this extension a spin, so I am looking for some help. Is this because there are errors in my console (unrelated to the extension)?
5565832--574033--Annotation 2020-03-08 211330.png

This is the error I recieve:

ArgumentException: Invalid path
System.IO.Path.GetDirectoryName (System.String path) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEditor.Extensions.EmbedPackage.EmbedPackageValidation () (at C:/Users/gears/Downloads/upm-embed-master/upm-embed-master/Assets/EmbedPackage/Scripts/EmbedPackage.cs:39)

Thank you for the help in advance.

@Mr-Mechanical what are you doing to get those errors to show up? can you describe what did you do (simply right-click ?)

1 Like

Thank you for your response. In my case I just right clicked. The project was imported as a unitypackage in which the unity package included other contents other than just the package embeder. I tried reimporting separately however the issue remains. I assume this is an issue with Unity 2020 alpha since the package embeder works perfectly with the Unity 2019 version running on another device. For now I will embed packages by hand with 2020a until whatever 2020a bug is fixed.

@Mr-Mechanical i just tested on a 2020 version and it works for me.
Do you have any idea where your packages are stored? can you remove my helper package, then right-click any package you have in your project, and select “Open in explorer”, what path is it stored under?

Unity has developed something similar to this in their Package Development package (com.unity.upm.develop). It adds a “Develop” button in the package manager that will embed the package into the project when clicked.

5 Likes

We are not able to run the Embed Package on 2019.2 it says Embedding but nothing occurs…

Any ideas? We are using source control as well ( perforce ) - thnx