- Home /
Compiler options, unsafe
I would like to be able to use pointers in some C# code in Unity3d version 3.5.
It seems that the right way to do this is by setting compiler options, specifically "-unsafe".
I've tried making smcs.rsp and gmcs.rsp files in the Assets folder with the text "-unsafe" in them (as recommended elsewhere), but that does not seem to work.
I've been told that there is a property list that I should edit somewhere, but I have not been able to find it.
Any help would be much appreciated.
I'm trying to manage an unsafe class for many time but i can find the solution ! I've tried to build my own dll but that way i got a unhandled execption It's really making me mad ... Is there someone out there to help us ! I mean a complete solution I know i have to use 'unsafe' keycode but where do i setup unity to make it compile ? =O
Answer by Varaughe · Sep 23, 2014 at 09:14 PM
for unity windows, smcs.rsp with -unsafe text inside it ,is my only option, also remember that the C# code itself has to be provided with an unsafe keyword ...
Answer by pfiguero · Jul 21, 2016 at 11:59 AM
This line:
when targeting MS compiler, csc is used with csc.rsp, etc.
at
https://docs.unity3d.com/Manual/PlatformDependentCompilation.html
may be important to notice... I had to add that file too, so code could be exported to Visual Studio.
Your answer
Follow this Question
Related Questions
How to enable unsafe and use pointers 4 Answers
Optimizations in scripts 1 Answer
complier Error unexpected char' '. 1 Answer
Internal Compile Error after adding any script 0 Answers
What compiling error is this?! 1 Answer