-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NuGetForUnity CLI Package Generates Incorrect/missing .meta files #637
Comments
Hi @Reag |
Hi, We tried to use NuGetForUnity recently and found it doesn't work well with source generator in Unity 2022. Here is a scenario:
Even when NuGetForUnity.Cli is used to restore the nupkg before launching Unity, the project still can't be opened correctly because Unity generates .meta file for the source generator without I looked into the code of NuGetForUnity.Cli, there is a Should |
Description
The purpose of the NuGetForUnity CLI tool is to act as a pre build step for automated pipelines. However, when it downloads a DLL that includes a Roslyn Analyzer (Especially if said DLL is for code gen), said DLL will not receive a .meta file that includes the correct label. This means that the DLL will never perform its code gen in the automated pipeline.
In the normal editor, this isn't a problem, as part of the startup process includes a NuGet Restore that will build these meta files and tag them. However, in an automated pipeline, this step never seems to actually occur. If you perform
It will fail to perform the required code gen and the .meta files will not have the correct label. Performing the same set of operations works fine if the editor is not in batch mode.
The text was updated successfully, but these errors were encountered: