(NOTE: I posted this last night before the service outage, however the service outage looks to have wiped my original posting. So if that post re-emerges, please apologize my double-post).
I have been spending quite some time attempting to integrate a custom C++ DLL, built in Visual Studio Professional 2010, and regardless of what I do, I am plagued and haunted by the same error message - EntryPointNotFoundException.
I’ve gone over all of the available Unity DLL building tutorials, ‘gotcha lists’, hints, tips and all of that. The one thing I can’t seem to find anywhere is just a simple example, or even an example project, that just shows how to do this.
So I’m at a bit of an impasse here. I’m not really sure where to go next with my code to write this DLL, and I’ve stripped the plugin down to some pretty extreme basics. Here is what I’m compiling with:
.H File:
#pragma once
using namespace System;
namespace PluginTestFramework {
public ref class Class1
{
void test(){};
};
}
And the .cpp:
#include "stdafx.h"
#include "PluginTestFramework.h"
And finally the loading code in C# in Unity…
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
public class PluginTest : MonoBehaviour
{
[DllImport ("PluginTestFramework")]
private static extern void test();
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
test();
}
}
With as simple and basic as that is, I still get the same EntryPointNotFoundException error. I’m guessing I’m missing something, and since I can’t find a good tutorial on how to build this, I’m not really sure what I’m missing.
Any help at all would be very beneficial - to myself, and anyone else seeking to build DLL plugins for Unity.
Thank you in advance!