JetBrains / JetBrains/resharper-unity
QuickFix to generate OnValidate IsNotNull on SerializeField
Open
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
```
public class NewBehaviourScript : MonoBehaviour
{
[SerializeField] private GameObject MyField;
// QuickFix to generate this on MyField
void OnValidate()
{
Assert.IsNotNull(MyField);
}
}
```
Contributor guide
Research direction
Start by locating the existing QuickFix entry points for Unity and serialized fields, then review how generated methods and assertions are tested. Done means a QuickFix can generate the shown OnValidate method with an Assert.IsNotNull check for a selected SerializeField.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- game-dev, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100