[Unity] How to use C#’s NuGet package resources in Unity

【background】

Unity's scripting language is C#, and C# has many functions and capabilities that can be provided through nuget packages. Is there a way to combine these capabilities into Unity and use them together? If possible, it will greatly expand the convenience of implementing various functions in Unity.

【method】

The answer is: you can!

  1. Obtain the Nuget package. Generally, as long as the Nuget package can be found, there will also be a corresponding github URL to download the source code.Insert image description here
  2. After getting the package, open the required dll file. Copy directly to the Assets->Plugins folder of the project. If this folder does not exist, create a new one.Insert image description here
  3. Unity will automatically recognize these DLLs as plug-ins and precompile them. After precompilation is completed, you will find that the classes in the corresponding script have changed from unrecognized to recognized. Import successful!

Guess you like

Origin blog.csdn.net/weixin_41697242/article/details/135398933