Meta Files for Custom Git Package?

I’ve created a small repo to try out distributing code using the package manager: GitHub - achapin/quickref: Quick Reference Manager for Unity

The basic structure was set up according to the documentation here: Unity - Manual: Package layout. Since that documentation doesn’t mention any other Unity-specific files or folders, I kept it as a standalone folder, not a Unity project.

However, when I go into a target project, and add a reference to the package’s master commit (Added quickref scripts · achapin/quickref@79cbb17 · GitHub), I get errors that all of the files are missing .meta files and the path is immutable and will be ignored. As a test, I created a new branch where the code files are part of a Unity project, and thus have generated meta files. When my test project targets that commit (Fix package json location · achapin/quickref@119daa6 · GitHub) the code files are able to be loaded and referenced correctly, but there are still warnings for other files, like the package.json. What’s also odd (see screenshot) is that even though the code files are loaded and usable, the package folder still appears to have no contents in the hierarchy. This is even after a full and partial reload.

Is this expected/intended? I tried this test on Windows, with an account that has admin access (though neither the Unity Hub nor the editor were specifically launched as an administrator). Logs are attached.

6059561–656108–logs.zip (7.65 KB)

You must include .meta files into your repository. You can achieve that by

  1. create package at the root path of the repository (package.json at the root path)
  2. create a dummy Unity project and move your checkout to the Packages folder. Unity will treat your package mutable (in-development) and generate meta files for you.

Commit to git and create another dummy project to test your package via Git URL.