1. 程式人生 > >unity學習筆記【unsafe錯誤】

unity學習筆記【unsafe錯誤】

dll的資料傳遞給U3D中的C#,需要使用C#的指標,直接編譯會出現以下錯誤

Unsafe code requires the 'unsafe' command line option to be specified。

解決辦法:

在你的Assets目錄下面新增smcs.rsp檔案,裡面只加一行字不要有空格 

-unsafe。

重啟Unity3d。