Unity logo
Cancel
Cart
Applications
Sell Assets

Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Templates
Tutorials
1/3

Connecting C++ native DLL to C# for Unity:


Would you like to write your own Windows based DLLs?


So this asset is for you, it saves a lot of time researching how to connect a native C++ DLL to Unity.


This is basically a sample/tutorial project with both sides of the solution: C++ and C#.


NOTE: This package is not intended for non programmer users.


What is included in this package:

- Complete DLL project (Visual Studio 2015 Community)

- Unity C# source code to access the demo DLL data.

- Full documentation explaining the source files, and also how to generate your own DLL projects from scratch.


Why native instead of managed DLLs?

Native DLLs normally don’t need external dependencies, so reduces compilation issues. C# DLLs tends to need System DLLs to export final product, specially if you are connecting with some awesome new technology.


So you can develop your C++ code within Visual Studio and then connect it to Unity through a DLL file following the instructions included in this package.


Data types exposed in C++:

int, float, bool, string, wstring, char*, wchar_t*, byte*.


Date exposed on C# side:

int, float, bool, string, byte[].


If you find that some data type must be included in this project, please do not hesitate on contacting me: jmonsuarez@gmail.com


Make your own native dll

(7)
105 users have favourite this asset
(105)
$6
Taxes/VAT calculated at checkout
License type: Single Entity
Single Entity
Recommended for individuals and small businesses.
Multi Entity
Recommended for large enterprises working across multiple locations.
Refund policy
This asset is covered by the Unity Asset Store Refund Policy. Please see section 2.9.3 of the EULA for details.
Secure checkout:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
License type
File size
2.8 MB
Latest version
1.1
Latest release date
May 9, 2016
Original Unity version
5.3.2
Support
Visit site
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR