CSharpCompilerSettingsForUnity icon indicating copy to clipboard operation
CSharpCompilerSettingsForUnity copied to clipboard

Cannot use global using directive.

Open sandichhuu opened this issue 2 years ago • 0 comments

Describe the bug "global using directive" not work.

To Reproduce Steps to reproduce the behavior:

  1. Make a script contain this line: global using MB = UnityEngine.MonoBehaviour
  2. Go back to Unity Editor and got error: "A namespace cannot directly contain members such as fields or methods"

Expected behavior https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-directive

Environment (please complete the following information):

  • Version: 1.5.0
  • Platform: Unity Editor
  • Unity version: 2021.3.5
  • Build options: Mono + .Net 4.x

sandichhuu avatar Jul 27 '22 07:07 sandichhuu