Simplest Plugin
This plugin project implements only some very basic operations (print a number, print a string, add two floats, add two integers). This example may be helpful if this is your first Unity plugin. The project can be found here and includes Windows, Mac, and Linux project files.
http://docs.unity3d.com/uploads/Main/SimplestPluginExample-4.0.zip
Unfortunately, the SimplestPluginExample doesn’t work in 5.2.1 or 5.2.2.
Loading the most basic plugin results in the following errors.
Failed to load ‘Assets/Plugins/ASimplePlugin.dll’, expected 64 bit architecture (IMAGE_FILE_MACHINE_AMD64), but was IMAGE_FILE_MACHINE_I386. You must recompile your plugin for 64 bit architecture.
Failed to load ‘Assets/Plugins/ASimplePlugin.dll’, expected 64 bit architecture (IMAGE_FILE_MACHINE_AMD64), but was IMAGE_FILE_MACHINE_I386. You must recompile your plugin for 64 bit architecture.
Failed to load ‘Assets/Plugins/ASimplePlugin.dll’, expected 64 bit architecture (IMAGE_FILE_MACHINE_AMD64), but was IMAGE_FILE_MACHINE_I386. You must recompile your plugin for 64 bit architecture.
Failed to load ‘Assets/Plugins/ASimplePlugin.dll’, expected 64 bit architecture (IMAGE_FILE_MACHINE_AMD64), but was IMAGE_FILE_MACHINE_I386. You must recompile your plugin for 64 bit architecture.
Failed to load ‘Assets/Plugins/ASimplePlugin.dll’, expected 64 bit architecture (IMAGE_FILE_MACHINE_AMD64), but was IMAGE_FILE_MACHINE_I386. You must recompile your plugin for 64 bit architecture.
PluginImport:Start() (at Assets/PluginImport.cs:25)
PluginImport:Start() (at Assets/PluginImport.cs:21)
DllNotFoundException: Assets/Plugins/ASimplePlugin.dll
PluginImport.Start () (at Assets/PluginImport.cs:21)
Reported in the bug reporter.
(Case 739744) Native Plugins Aren’t working in 5.2.1 or 5.2.2
Tested on WIndows 10 (64-bit)