error CS0227: Unsafe code may only appear if compiling with /unsafe. Enable "Allow 'unsafe' code" in Player Settings to fix this error.
스크립트 코드에 'unsafe' 라는 키워드가 들어가게되면 설정이 포함되지 않으면 생기는 이슈이다.
단순하게 unsafe를 처리할수 있도록 옵션을 변경해주면 된다.
Unity - [Project Setting] -[Other Settings] - Allow 'unsafe' Code 를 활성화 시켜주면 된다.
IDE에서는 xml을 추가해줘야한다.
Assembly-CSharp-Editor.csproj
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup
★☆☆☆☆
반응형
댓글