Search Unity

  1. Click here to receive a gift with your purchase of Unity Pro or Unity Enterprise.
    Dismiss Notice
  2. 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

Package errors when pulling project through Github on another PC

Discussion in 'Package Manager' started by KNJturtle, Oct 23, 2020.

  1. KNJturtle

    KNJturtle

    Joined:
    Jul 20, 2017
    Posts:
    4
    Hi all,

    I'm somewhat new, so sorry if this is a silly question. I've have a couple packages installed on my project (Input System and YarnSpinner). They work fine on one PC and I can do all the usual stuff (referring to package namespaces, adding component scripts/creating assets related to the packages etc).

    However, upon pushing the project onto GitHub and pulling the project onto a another PC using Git bash, I get errors saying that all the namespaces related to the packages can't be found in the project. All assets and component scripts related to the packages also can't be loaded.

    Looking into the package manager, the packages are in the project, so I don't think it's a case of not having the packages installed. Re-installing the packages on the package manager doesn't seem to fix it either. They work perfectly fine on a fresh new project though, and I'm using the same Unity version on both PCs.

    The only thing I can think of is something happening during the git pull, so I figured I'd have a look at the GitHub Unity plugin. However, I can't seem to use the plugin on the pulled project after installing using the package manager, but again works fine on a fresh new project loaded on the 2nd PC.

    I don't suppose anyone would happen to know anything?

    EDIT: I'm using Unity 2020.1.0f1
     
    Last edited: Oct 23, 2020
  2. UnityMaru

    UnityMaru

    Community Engagement Manager Unity Technologies

    Joined:
    Mar 16, 2016
    Posts:
    722
    I don't suppose you could screencap or post a log specifically saying what the errors are, could you?
     
  3. KNJturtle

    KNJturtle

    Joined:
    Jul 20, 2017
    Posts:
    4
    Sure thing!

    upload_2020-10-23_12-57-33.png

    Here's also the my package manager, to hopefully confirm that I have the packages installed.

    upload_2020-10-23_12-59-23.png
     
  4. KNJturtle

    KNJturtle

    Joined:
    Jul 20, 2017
    Posts:
    4
    Here is also the editor log
     

    Attached Files:

  5. KNJturtle

    KNJturtle

    Joined:
    Jul 20, 2017
    Posts:
    4
    Hello, I figured it out. I didn't realise that .gitignore only ignores folders/files that are not yet in the repository, and I assume one of the folders/files that wasn't properly ignored was messing with the packages.

    So when you add new files to ignore in the .gitignore, you need to clear the git cache.

    git rm -r --cached .
    git add .
    git commit -m "Added more stuff to .gitignore"
     
  6. UnityMaru

    UnityMaru

    Community Engagement Manager Unity Technologies

    Joined:
    Mar 16, 2016
    Posts:
    722
    Oh, interesting. Thank you! That one was a bit of a headscratcher. Glad you were able to find a fix.
     
unityunity