コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】Unsafe code requires the `unsafe' command line option to be specified. Enable "Allow 'unsafe' code" in Player Settings to fix this error.

概要

Unsafe code requires the `unsafe' command line option to be specified. 
Enable "Allow 'unsafe' code" in Player Settings to fix this error.

Unity で上記のエラーが発生した場合は、

f:id:baba_s:20180415101318p:plain

Player Settings で「Allow 'unsafe' Code」にチェックを入れてから、
エラーが発生しているスクリプトを Reimport すると直ります