Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

How to move packages to an offline installation?

Discussion in '2018.1 Beta' started by jwvanderbeck, May 1, 2018.

  1. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    Hello,

    I am trying to figure out how to do some testing of the newer features such as the HDRP and ShaderGraph with an install that has no direct connection to the internet.

    Previously with asset store packages, it was a simple (if annoying) process of downloading the asset through a Unity install connected to the internet, then copying the asset packages from that install to the offline install and letting it import them.

    However after installing these packages form the Package Manager, I don't see any new assets in my project that I could copy over to the offline install.
     
  2. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    The files live in a central package cache location on the computer. You can find the locations in this post: #7

    If you want a per-specific-project local copy you should be able to copy the required folders from the cache to the Packages folder within the root of your project folder.
     
  3. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    Unfortunately that didn't seem to help and in some ways made things worse.

    After copying the packages and the dependencies over to the Packages folder of the offline project and starting Unity, the package manager attempts to "resolve packages" which appears to want to go back online again. After a bit it then errors out with a connection timeout (obviously) then kills the editor (this seems intentional).
     
  4. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Did you initially use the Package manager UI to add those packages to your project? I'm sort of guessing that might be the issue, because I assume it will have added those package names to the dependencies section of the manifest.json file that lives in your projects Packages folder. But since you have copied the packages manually, you dont want the package manager to try to do its thing as well. So if it were me, I would try editing the manifest.json file with a text editor and removing the dependencies.

    Sorry if this doesnt help but thats my best guess.
     
  5. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    Oh I added the dependencies manually to the offline project's manifest because I thought that was how it would know they were in the project. I will try removing those entries.
     
  6. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    Seems to do the same thing even without the dependencies listed in the top level manifest.

    However since each package has its own manifest, presumably it is trying to process those like a good package manager should. It just doesn't seem to realize that all thoe dependencies are available locally :(
     
  7. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Hmm yeah I did start to think about all the manifest files & dependencies that packages may have while I was writing my previous reply. I know its getting a bit silly at the following stage, but I suppose you could try removing all the dependencies from each package.

    I'm used to making local package copies but am not used to working offline, let me have a muck around for a bit and see if I discover anything that might be useful to you!
     
  8. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    I think I have it working.

    I had copied all the packages to the "central" location in the offline install, and then copied just the top level ones I wanted to the project's local packages, and this did not work.

    However by copying all the packages to the local packages, it now seems to be functioning.
     
  9. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Ah, I wonder what the detail is behind that working. Certainly when I was just experimenting with unplugging my network, I had a lot of success, even if I emptied out the central package cache completely before one test it still worked as long as all the required packages had been copied locally. And I only copied 3 to my projects Packages folder (in the case of my test, post-processing, pipeline-core and hd-pipeline). But I also noted that some of the default packages (eg ads, analytics, purchasing, standard events, package manager ui) reappeared in the central cache location after I had emptied that location, but when I had no network, so those ones were regenerated but not re-downloaded when I reran Unity. Perhaps your final test worked because you copied those, or perhaps there was another package dependency you hadnt accounted for.
     
  10. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Hi @jwvanderbeck ,

    Once you have your packages added to your project and running (with an internet connection), you project should work offline without errors. This is done automatically without you having to do anything. The only restriction you get when offline is that you will not have access to new update through the package manager UI.

    If you have any issue working with your project offline, please report a bug or reply here and make sure to include you project manifest and editor.log file.

    @elbows Copying packages under the
    Packages
    folder is what we call *embedding* a package. This feature is not officially supported and has some limitations and potential bugs. Use with caution. This will officially be supported in 2018.3 (if everything goes well).

    Regards,

    Pascal
     
  11. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    It isn't a matter of just working with a project online and offline.

    Our production machines, where all the artists do their work in Unity, are no connected to the internet, ever. Which means if we want to get an asset (or now a package) into those projects we have to essentially make a dummy project on an internet facing machine, install the asset, then export it from the dummy project and import it in the real project.

    With packages there is no method to do this, hence the manual copying of files around. I installed the packages using the Package Manager in the dummy project on the Internet facing machine, then had to copy the packages from that dummy project over to a completely different project, the real project on a production machine.

    Frankly it is a huge pain that I wish could be made smoother :( I did finally get it working though. Unfortunately while I got it working for testing, this process for packages is far more complicated than for normal assets, and this is not an artist friendly process at all.

    tl;dr It isn't about the packages in a project continuing to work when offline, it is about getting the packages installed into a project that was never online in the first place.
     
    Last edited: May 1, 2018
  12. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Ho! I now understand your use case. You are in what we call a *closed network*! We have plan to support this scenario. I can't really tell you more than that at this point though. Sorry :(

    But I understand your pain now. For sure, the old asset store package were more trivial for you to use. The idea is simple, it just takes file and put it in your project. But the package manager adds more value (packages can be removed without leaking asset in your projects, dependencies support, and many more features to come ...)

    I will let know our product management team about your use case.

    Regards,

    Pascal
     
    sean_virtualmarine likes this.