Skip to content

Cannot use global using directive. #17

Open
@sandichhuu

Description

@sandichhuu

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions