Hi,
Is it impossible to use the code with keyword "unsafe" from C# in Unity3d? I have to use the code with "unsafe". Have anybody idea?
Thanks a lot, Max
Hi,
Is it impossible to use the code with keyword "unsafe" from C# in Unity3d? I have to use the code with "unsafe". Have anybody idea?
Thanks a lot, Max
Yes. Create a smcs.rsp file (or gmcs.rsp if you are using the full .NET 2.0 profile) in Assets/ with -unsafe in it.
No, you probably can't, since all unsafe code requires the `/unsafe` compile-time directive, and you can't specify those in Unity.
MSDN:
To compile unsafe code, you must specify the /unsafe compiler option. Unsafe code is not verifiable by the common language runtime.
http://msdn.microsoft.com/en-us/library/chfa2zb8(VS.71).aspx
What purpose would you even have for using `unsafe` in your game? I'm pretty sure there's another way to do what you're trying to do.