Hi, my code is
...
...
Private Color[] cols;
Private GCHandle cols_handle
cols = texture.GetPixels(0);
cols_handle = GCHandle.Alloc(cols, GCHandleType.Pinned);
...
...
<Plugin>myFunction(cols_handle.AddrofPinnedObject());
But I am getting on the last line written above InvalidOperationException: The handle is not of Pinned type System.Runtime.InteropServices.GCHandle.AddrOfPinnedObject()
Please someone tell me WHYYYY I am getting this error !!! while I am clearly setting the handle (cols_handle) to type Pinned ??
I have gone mad.. Help would be highly appreciated.
Thanks