handzlikchris / handzlikchris/FastScriptReload

Executing compiler command should include /unsafe param if it's compiling unsafe code

Open
#166 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.2k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

Trying out the coolest package ever on my codebase.
Found that unsafe will not compile

```
error CS0227: Unsafe code may only appear if compiling with /unsafe'
at FastScriptReload.Editor.Compilation.DotnetExeDynamicCompilation.ExecuteDotnetExeCompilation
```

Fixed at Assets\FastScriptReload\Scripts\Editor\Compilation\DotnetExeCompilator.cs by adding /unsafe flag

![Image](https://github.com/user-attachments/assets/ca7ef0b7-a0e6-428d-873a-453ffcf4ce33)

BTW I am using Unity 6 and everything works fine. Your are the GOAT hehe

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in Assets\FastScriptReload\Scripts\Editor\Compilation\DotnetExeCompilator.cs, particularly the ExecuteDotnetExeCompilation path mentioned in the error. Reproduce compilation with unsafe C# code and verify that the compiler command includes /unsafe and completes without CS0227.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
compilers, game-dev
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.