Coder Social home page Coder Social logo

mergull / newtonunityplugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from svenberra/newtonunityplugin

0.0 0.0 0.0 58.14 MB

NewtonUnityPlugin is a managed plugin for Unity 3D that allows you to use the Newton Dynamics physics engine

License: MIT License

C# 28.44% C++ 25.16% C 3.88% Scheme 1.49% Makefile 5.30% OCaml 2.03% Ruby 0.04% Shell 11.13% Pike 0.09% M4 19.09% Python 2.30% Batchfile 0.12% GDB 0.20% Perl 0.11% Meson 0.62%

newtonunityplugin's Introduction

Compiling NewtonUnityPlugin

Windows supported only for now. It should work on any other OS too once the plugin is completed, but while the plugin is under development only a Windows project will be provided.

Step 1, Download and build the Newton Dynamics Library

The best option is to clone Newton from the following repository. https://github.com/MADEAPPS/newton-dynamics/

Open the following solution file. <newton install dir>\sdk\projects\visualStudio_2015_static_mt\build.sln

Choose Release & x64 and build the solution.

Finally, create an environment variable named NEWTON_DYNAMICS that points to the location where you cloned Newton. For example, if you cloned Newton to C:\newton-dynamics-master the environment variable should be C:\newton-dynamics-master without the slash in the end.

Step 2, Download and build the NewtonUnityPlugin

https://github.com/svenberra/NewtonUnityPlugin

Just open the solution file (NewtonUnityPlugin.sln) and build. (Visual Studio 2015) For now, choose Release and x64

NewtonPlugin & NewtonPluginEditor

NewtonPlugin & NewtonPluginEditor requires references to the assemblies UnityEngine.dll & UnityEditor.dll which you will find where Unity 3D is installed. <Unity Installdir>\Editor\Data\Managed
Copy them over to the folder PluginBin to make sure you compile the plugin with the same dlls Unity are using.

Using NewtonUnityPlugin

After building the projects there will be three dlls in the PluginBin folder.

  • NewtonPlugin.dll This managed dll(assembly) contains the runtime components(world, colliders, bodies and joints). In your unity project Assets folder, create a subfolder named Plugins and put it there.

  • NewtonPluginEditor.dll This is another managed dll that contain editors for the above components. This plugin goes into a subfolder called Editor under the Assets folder.

  • NewtonWrapper.dll This native dll contains the SWIG-generated C-functions that the managed dlls above use to access the Newton API. This plugin goes into the same folder as NewtonPlugin.dll

The plugins are compiled as 64-bit libraries by default so remember to compile Newton as 64-bit as well.

When Unity detects the plugins you will need to tell Unity if it's 64-bit or not. Just click on the plugin in the Assets view and check the 64-bit option.

Demo

Demos and examples can be found in the Demos folder.

newtonunityplugin's People

Contributors

juliojerez avatar svenberra avatar mergull 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.