JetBrains / JetBrains/resharper-unity

Creating a new class in the assets/scripts folder doesn't set the namespace

Open
#1,250 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.2k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

When creating a new class in the Assets/Scripts folder using the Unity explorer in Rider doesn't fill in the namespace (defaults to DefaultNamespace) correctly even though the root namespace is set in Unity. This does work when done in a sub folder of the scripts folder.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by creating a class in the Unity explorer in Rider directly under Assets/Scripts, then compare it with creation in a subfolder. Trace the namespace-generation entry point for those two locations and verify that the configured Unity root namespace is used instead of DefaultNamespace. Done means both locations produce the expected namespace.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
devtools, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.