Giter Site home page Giter Site logo

unity_nuget's Introduction

Unity NuGet

Note 1: These steps only tested in Macos environment
Note 2: This is based on https://medium.com/@alexandredemersroberge/use-nuget-packages-with-unity-25b8525f628

Configuration steps:

  1. Check Mono installation (eg. type in Terminal mono --version)
  2. Open Rider and select creating new Project
  3. Select Class Library (under .NET Framework)
  4. Edit solution name field
  5. Edit solution directory field by choosing Unity project root folder (Rider will create project root folder by itself)
  6. Edit framework field and choose .Net Framework v4.8
  7. Hit Create
  8. [macos] If project has errors related to missing .Net Framework, download it from Mono (https://www.mono-project.com/download/stable/). Homebrew will not help
  9. Unload the project (Right click on project in Explorer -> Unload Project)
  10. Double click on project in Explorer to modify its content
  11. To the bottom (right before </Project>) add following:
    <!-- Move the DLL to the Unity project. -->
    <Target Name="AfterBuild">
        <PropertyGroup>
            <TargetDir>..\..\Assets\Plugins\$(AssemblyName)\Resources</TargetDir>
        </PropertyGroup>
        <ItemGroup>
            <SourceDir Include="bin\Debug\**\*.*" Condition="'$(Configuration)' == 'Debug'"/>
            <SourceDir Include="bin\Release\**\*.*" Condition="'$(Configuration)' == 'Release'"/>
        </ItemGroup>
        <Copy SourceFiles="@(SourceDir)" DestinationFolder="$(TargetDir)" SkipUnchangedFiles="true"/>
    </Target>
    
  12. Load the project (Right click on project in Explorer -> Load Project)
  13. Install desired NuGet package
  14. Select Debug or Release build configuration
  15. Build solution (hit Build Solution (โŒ˜F9) button)
  16. After successful build you can find newly created dll at {UnityProject}/Assets/Plugins/{SolutionName}/Resources

unity_nuget's People

Contributors

artein avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.