Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Easily embed packages to your project with this extension

Discussion in 'Package Manager' started by liortal, Oct 25, 2019.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,422
    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: https://github.com/liortal53/upm-embed#0.1.0
    • 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 :)

    upload_2019-10-25_11-27-41.png
     
    Last edited: Nov 9, 2019
    starikcetin, SugoiDev and Favo-Yang like this.
  2. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    273
    Let's convert this into a UPM package and add it to Awesome UPM.
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,422
    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 ?
     
  4. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    273
    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).
     
  5. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,422
  6. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    273
    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
     
  7. OndrejP

    OndrejP

    Joined:
    Jul 19, 2017
    Posts:
    92
    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.
     
  8. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,422
    I will look into that, thanks.
     
  9. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,422
    fixed
     
  10. OndrejP

    OndrejP

    Joined:
    Jul 19, 2017
    Posts:
    92
    Looking good, thanks!
     
    liortal likes this.
  11. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    273
    liortal likes this.
  12. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,422
    Thank you :) hopefully this helps someone(s) in our awesome community !
     
    starikcetin likes this.
  13. Mr-Mechanical

    Mr-Mechanical

    Joined:
    May 31, 2015
    Posts:
    479
    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)?
    Annotation 2020-03-08 211330.png
     
  14. Mr-Mechanical

    Mr-Mechanical

    Joined:
    May 31, 2015
    Posts:
    479
    This is the error I recieve:
    Code (CSharp):
    1. ArgumentException: Invalid path
    2. System.IO.Path.GetDirectoryName (System.String path) (at <437ba245d8404784b9fbab9b439ac908>:0)
    3. 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.
     
  15. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,422
    @Mr-Mechanical what are you doing to get those errors to show up? can you describe what did you do (simply right-click ?)
     
    Mr-Mechanical likes this.
  16. Mr-Mechanical

    Mr-Mechanical

    Joined:
    May 31, 2015
    Posts:
    479
    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.
     
    Last edited: Mar 11, 2020
  17. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,422
    @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?
     
  18. jasonatkaruna

    jasonatkaruna

    Joined:
    Feb 26, 2019
    Posts:
    64
    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.

    Annotation 2020-03-14 183452.png
     
  19. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    227
    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
     
unityunity