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

Unity installation via .unitypackage without NuGetForUnity #264

Open
nicenerd opened this issue Oct 25, 2024 · 1 comment
Open

Unity installation via .unitypackage without NuGetForUnity #264

nicenerd opened this issue Oct 25, 2024 · 1 comment

Comments

@nicenerd
Copy link

It would be great to be able to install the library via .unitypackage like UniRx / UniTask.
Pulling a NuGetForUnity dependency just to download a few libs seems like a lot of heavy lifting.

@georg-walkingtreegames
Copy link

I'm also not a big fan of NuGetForUnity. I have this simple bash script in my projects, which downloads any dependency for me. The result needs to be put in source control though:

#!/bin/bash

function install_dependency() {
  name=$1
  version=$2
  dir="NuGet/${name}"
  
  echo "Installing ${name}"
  mkdir -p "${dir}"
  rm -rf "${dir}/*"
  curl -sL "https://www.nuget.org/api/v2/package/${name}" --output "${dir}/dependency.zip"
  unzip -uq "${dir}/dependency.zip" -d "${dir}/" 
  rm "${dir}/dependency.zip"
  rm -fr "${dir}/package"
  rm -fr "${dir}/runtimes"
  rm -fr "${dir}/_rels"
  rm -fr "${dir}/ref"
  ls "${dir}/lib" | grep -v "${version}" | xargs -I {} echo "${dir}/lib/"{} | xargs rm -r
}

install_dependency "R3/1.2.9" "netstandard2.0"
install_dependency "Microsoft.Bcl.AsyncInterfaces/6.0.0" "netstandard2.0"
install_dependency "Microsoft.Bcl.TimeProvider/8.0.0" "netstandard2.0"
install_dependency "System.ComponentModel.Annotations/5.0.0" "netstandard2.0"
install_dependency "System.Runtime.CompilerServices.Unsafe/6.0.0" "netstandard2.0"
install_dependency "System.Threading.Channels/8.0.0" "netstandard2.0"

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

No branches or pull requests

2 participants