JetBrains / JetBrains/resharper-unity
Mark transform as not-nullable
Open
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
The ReadMe states
> Mark `Component.gameObject` and `Object.name` as not-nullable
But `transform` is not explicitly marked as not-null as well despite Unity official documentation stating
> Every GameObject has a Transform
**Source:** https://docs.unity3d.com/Manual/class-Transform.html
Is there a specific reason it isn't covered as well? Could this be fixed / added?\
**EDIT:** Both `Component.transform` and `GameObject.transform` are affected.
First one is accessed when just typing `transform` and second one when typing `gameObject.transform` explicitly.
Contributor guide
Assessment
This issue has not been assessed yet.