I'm trying to get GL.IssuePluginEvent to work, according to this: http://docs.unity3d.com/Manual/NativePluginInterface.html
I have a plugin made with this code:
extern "C"
{
void UnityRenderEvent (int eventID)
{
NSLog(@"Got render event.");
}
}
I can call that function directly from Unity, and it works; I'm sure I've built the plugin correctly, and included it in the project correctly. But when I do GL.IssuePluginEvent(0)
, nothing happens. Some idea what I could be doing wrong? According to Unity's demo, this is all that has to be done. I think.
I know that in their example, they have it defined as void EXPORT_API
, but I found this in their code example:
// Attribute to make function be exported from a plugin
#if UNITY_METRO
#define EXPORT_API __declspec(dllexport) __stdcall
#elif UNITY_WIN
#define EXPORT_API __declspec(dllexport)
#else
#define EXPORT_API
#endif
So on iOS, EXPORT_API
becomes ""
.