You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
There is an issue with the incorrect usage of
NotNullAttribute
in theUnityEngine.Component.transform
property.In the file
resharper-unity/resharper/resharper-unity/src/annotations/UnityEngine.xml
, the following entry is present: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.
The text was updated successfully, but these errors were encountered: