|
Hi, my code is
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
(comments are locked)
|
|
Are you absoloutely sure that cols_handle is called after being pinned, and isn't freed before being used? The code itself looks fine, but it'll screw up if the bits where you put ... modify the handle yes i m sure. infact after getting this error i removed the lines which free the handle. main puzzle is that the same code is running in TextureUnityProject example given in unity3d documentation. i just copied the lines...
Jul 17 '10 at 03:03 AM
Arjun
Could you post the exact code you are using?
Jul 17 '10 at 05:43 AM
StephanK
Hi, thanks for responding here is the link to the exact code. (code was too long to write here) i hope u could solve the mystery. http://dl.dropbox.com/u/5420677/NewBehaviourScript.cs
Jul 19 '10 at 08:38 AM
Arjun
maybe this page could help you to figure it out http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Runtime/InteropServices/GCHandle.html#GCHandle.AddrOfPinnedObject%20Method i am getting the same error message
Jul 19 '10 at 08:40 AM
Arjun
(comments are locked)
|
|
oh gosh, sorry for wasting ur time i used void start() instead of void Start() so it was not initializing the variables , functions and all now its ok Heh, just noticed that when I checked, glad it's fixed :)
Jul 19 '10 at 10:13 AM
Mike 3
(comments are locked)
|
