Hello!

I was working and deleting some Assets in one Hololens Unity3D project, when I came across the following compilation error:

Assets/HoloToolkit/Sharing/Scripts/SDK/AnchorDownloadRequest.cs(58,22): error CS0227: Unsafe code requires the `unsafe’ command line option to be specified

If you are .Net developer you understand the context for this error, the message is asking us to enable a compilation flag to compile unsafe code.

My first task was a quick search, and I found the way to do this in Unity is following these steps

  • Create a text file named “smcs.rsp”
  • Edit the file and add the text “-unsafe”
  • Copy the file to the Assets folder in our Unity3D project

1 minute later I was able to build the project without problems. And I went back to see the HoloToolkitUnity contents, and I realize the file was inside it and that was one which I deleted in my “cleaning” process

po

Lesson learned!

Greetings @ Toronto

El Bruno

References

Leave a comment

Discover more from El Bruno

Subscribe now to keep reading and get access to the full archive.

Continue reading