- Home /
IssuePluginEvent - Passing Additional Parameters
The IssuePluginEvent function allows you to pass an int to your native function, but I need to pass much more state: Ideally, I would set up the state in the plugin beforehand, and pass an IntPtr to the callback. I can't do that on 64-bit, though, because an 8-byte IntPtr can't be stored in a 4-byte int. And I can't just call the plugin beforehand with "the next time the callback runs, use X state" because the operations are not synchronous.
How can I get more than an int into my rendering plugin? I could set up an array of states in the plugin and pass the index into the array as the IssuePluginEvent parameter, but how do I make sure the memory is synchronized between threads and between C# and C++?
Your answer
Follow this Question
Related Questions
Is there a way to use SkinnedMeshRenderer.BakeMesh() in multiple threads? (Mesh Instancing) 0 Answers
Unity4.6.9 crashes at some Android devices when "Multithread-rendering" is turned on. 0 Answers
Native Plugin: What has to happen in the RenderEvent? 1 Answer
Problems with Galaxy S3 and multithreaded rendering? 0 Answers
multithreaded rendering on android breaks nativetexture update in plugin 0 Answers