Skip to content
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

Restoring Packages With NugetForUnity #276

Closed
MattMoradi opened this issue Jul 2, 2021 · 5 comments
Closed

Restoring Packages With NugetForUnity #276

MattMoradi opened this issue Jul 2, 2021 · 5 comments
Labels
question Further information is requested

Comments

@MattMoradi
Copy link

Has anyone had success with using NugetForUnity with GameCI? I've been trying to pass a restore argument to the Unity executable using the customParameters field in the yaml file but still end up with missing assembly references during the actions build.

We've tried the following arguments with game-ci/unity-builder@v2:
customParameters: -executeMethod NugetForUnity.NugetHelper.Restore
customParameters: -quit -batchmode -projectPath ${{ matrix.projectPath }} -executeMethod NugetForUnity.NugetHelper.Restore
customParameters: -quit -batchmode -projectPath "${{ matrix.projectPath }}" -executeMethod NugetForUnity.NugetHelper.Restore

The customParameters field passes parameters directly to the Unity executable, correct?

And if you're wondering, we're just storing the NugetForUnity asset binaries in the repo (yes I know).

@davidmfinol
Copy link
Member

Hi @matthew17754
I'm not familiar with NugetForUnity, but it looks like you're trying to run a method NugetForUnity.NugetHelper.Restore.
If so, I think buildMethod may be what you're looking for instead of customParameters: https://game.ci/docs/github/builder#buildmethod

Have you tried buildMethod: NugetForUnity.NugetHelper.Restore?

@GabLeRoux
Copy link
Member

Or figure out how to call NugetForUnity.NugetHelper.Restore from a csharp script that looks something like what is shown in unity's documentation:
https://docs.unity3d.com/ScriptReference/BuildPipeline.BuildPlayer.html

Other examples:

@davidmfinol davidmfinol added the question Further information is requested label Jul 20, 2021
@davidmfinol
Copy link
Member

Hi @matthew17754 , did any of the suggestions work for you?
I believe this issue can be closed.

@JudahDoupe
Copy link

I know this thread is closed, but I'm running into a similar problem here and adding buildMethod: NugetForUnity.NugetHelper.Restore didn't seem to help.

The primary error that I'm getting is:
/github/workspace/Library/PackageCache/com.unity.jobs@0.51.0-preview.32/Unity.Jobs.CodeGen/CecilExtensionMethods.cs(17,13): error Mono.Cecil.ResolutionException: Failed to resolve Stateless.StateMachine'2<UiState,UiTrigger>

Here Stateless is a nuget package that I imported using NugetForUnity.

It's worth mentioning that I am able to build locally. Only my build pipeline has this problem. I am a little suspicious that this isn't a problem with NugetForUnity, but rather a problem with .dlls in general

@darrenge
Copy link

I am running into this as well. I don't think the NugetForUnity.NugetHelper.Restore is working either. My running theory is that I have the -ProjectPath set, so it is trying to do the Restore from the Project Path but in reality I need the restore to be called from ProjectPath\Assets. I don't know how to do that ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants