JetBrains / JetBrains/resharper-unity
All public fields are considered Unity serialisable
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description

Any public field in a MonoBehaviour is subject to Unity Engine Language & Frameworks Serialized field naming rules rather than C# Code Style "Fields (not private)" regardless of whether Unity can serialize it. Fields that do not represent a type Unity can serialize should use the C# Code Style rules.
For our particular usecase we mark all private fields (including those tagged with SerializeField) as m_, but public fields should be PascalCased.
Contributor guide
Research direction
Start by reproducing the behavior for public fields in a MonoBehaviour, comparing fields whose types Unity can serialize with fields it cannot. Trace how Unity serialization rules and the C# Code Style "Fields (not private)" setting are selected. Done means serializable fields retain Unity naming rules while non-serializable public fields use PascalCase.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- game-dev, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100