Closed
Description
There is an issue with the incorrect usage of NotNullAttribute
in the UnityEngine.Component.transform
property.
In the file resharper-unity/resharper/resharper-unity/src/annotations/UnityEngine.xml
, the following entry is present:
<member name="P:UnityEngine.Component.transform">
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" />
</member>
This annotation is incorrect because the transform property can indeed be null in certain scenarios. For example, when the GameObject to which the MonoBehaviour is attached is destroyed, but a lambda capturing this remains, the transform property will return null.
As such, using NotNullAttribute is inappropriate and misleading in this context. To accurately reflect the behavior of the transform property, the NotNullAttribute should be removed.
Metadata
Metadata
Assignees
Labels
No labels