marijnz / unity-shell

Write and execute code in an intuitive "shell" with autocompletion, for the Unity Editor.
MIT License
453 stars 29 forks source link

'CompilerContext' is inaccessible due to its protection level in Unity 2020.1.2f1 #13

Open omundy opened 4 years ago

omundy commented 4 years ago

I installed (dragged into Assets) in Unity 2020.1.2f1 and received the following errors

Assets/UnityShell/Editor/Scripts/ShellEvaluator.cs(27,34): error CS0122: 'CompilerContext' is inaccessible due to its protection level

Assets/UnityShell/Editor/Scripts/ShellEvaluator.cs(27,54): error CS0122: 'CompilerSettings' is inaccessible due to its protection level

Assets/UnityShell/Editor/Scripts/ShellEvaluator.cs(27,78): error CS0122: 'ConsoleReportPrinter' is inaccessible due to its protection level

Assets/UnityShell/Editor/Scripts/ShellEvaluator.cs(27,20): error CS1729: 'Evaluator' does not contain a constructor that takes 1 arguments

image

iamabigartist commented 2 years ago

I use 2020.3.25f1 :

  1. I use the original 4.x.dll.
  2. Delete the 3.5.dll for ambiguous reference.
  3. Select the 4.x.dll and Set "platforms for plugins" for all platforms.
  4. Then it should work.