0

Problem Summary:

I am working on a Unity project that uses several custom packages, each stored in its own GitHub repository. These repositories include large files tracked with Git LFS. When I clone each repository individually, the LFS files are correctly downloaded. However, when I clone the main Unity project repository, and open the project, Unity imports these custom packages automatically ( the main github reposity hasn't got a reference to the other repos, we let unity itself clone the repository using ssh, using a package.json file shown here), only the non-LFS files are cloned correctly. The LFS-tracked files (such as .png files) appear as placeholders (i.e., they only show file metadata, not the actual content, as shown here, and here), causing errors when the Unity project is opened, shown here.

Steps I've Taken:

  • Run git lfs install to ensure Git LFS is set up.
  • Reinstalled Git and Git LFS.
  • Removed and re-added my SSH key to GitHub.
  • Tried cloning the repository using SSH (git clone ssh://[email protected]/...).
  • Cleared Unity’s cache.

Additional Details:

  • I have both a personal and professional GitHub account, with my SSH key associated with my personal account.
  • When cloning custom repositories individually, everything works fine (all files are cloned correctly).
  • Unity imports the custom packages but fails to load the LFS files correctly.

Error Example:

When the LFS-tracked files (e.g., .png) are cloned, they are added to the project, but only their metadata is shown (e.g., the file’s path) rather than the actual content, leading to errors in Unity.

Logs:

I have checked Unity's logs, but they aren't revealing much more than the placeholder issue for the LFS files, shown here.

What I've Tried:

  • git lfs install
  • Reinstalling Git and Git LFS
  • SSH key reconfiguration
  • Cloning with SSH URL
  • Removing Unity cache

Versions:

  • Unity 2022.3.22f
  • git lfs version 3.6.1 (github; windows amd 64; go 1.23.3; get ea47a34b)

However, no one else in my company is experiencing this issue, so I suspect it may be related to my Git LFS configuration or Unity’s interaction with Git LFS.

2
  • 1
    I solved it, there is an issue with Unity 2022 and Git LFS version 3.6.1. It seems that Unity 2022 doesn't support LFS version 3.6.1, it is solved by going back to version 3.0.1. Commented Jan 20 at 10:49
  • 1
    I would file a bug for this kind of issues ... worst case: It's already known and fixed in later Unity versions .. best case: It is known now and will be fixed in later Unity versions ;) Commented Jan 20 at 12:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.