21
2016
How to enable unsafe keyword for Unity C#
Enabling “unsafe” for unity c# is quite simple:
– Add these 2 files to your project folder (inside Assets/ folder root)
– “smcs.rsp” and “gmcs.rsp”
– both files contain only 1 line of text: -unsafe
– Then restart Unity and VisualStudio/Monodev
*Note: Unity 5.5 wants also file “mcs.rsp”, 5.4 and lower versions wont need it
(You can download those files clicking “view raw” and then save the page)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-unsafe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-unsafe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-unsafe |
references:
– https://www.dotnetperls.com/unsafe
– https://msdn.microsoft.com/en-us/library/t2yzs44b.aspx
Related Posts
2 Comments + Add Comment
Leave a comment
Recent posts
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
- Check if point is inside polygon 2D (using line intersection)
- UnityHub: Enable Create Project Button (without having to select Cloud Organization)
- UI: Make Tooltip background fit Text content length
- Pong-Wars in Unity
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub)
- UnityHub: Add support for custom project title (instead of folder name) or use ProductName
- Testing Unity MUSE AI
- QR Code Generator Online
What is the keyword unsafe used for?
-thanks
Oh, just saw your links. Thanks