Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use global using directive. #17

Open
sandichhuu opened this issue Jul 27, 2022 · 0 comments
Open

Cannot use global using directive. #17

sandichhuu opened this issue Jul 27, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@sandichhuu
Copy link

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 sandichhuu added the bug Something isn't working label Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants