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
UnityObjectNullHandlingAnalyzer now supresses IDE0029 but not IDE0270. This causes IDE0270 to suggest null coalesce on Unity objects.
The following code example raises IDE0270
using UnityEngine;
class Camera : MonoBehaviour
{
public void M()
{
Camera item = FindItem() as Camera;
if (item == null)
throw new System.InvalidOperationException();
}
MonoBehaviour FindItem() => null;
}
Proposed solution
Add IDE0270 as a supressor to the UnityObjectNullHandlingAnalyzer
The text was updated successfully, but these errors were encountered:
I know that the issue is not yet approved, but I am confident about this fixing issues. Therefore I already created a pull request to hopefully be merged once this issue is approved: #324
Problem statement
UnityObjectNullHandlingAnalyzer now supresses IDE0029 but not IDE0270. This causes IDE0270 to suggest null coalesce on Unity objects.
The following code example raises IDE0270
Proposed solution
Add IDE0270 as a supressor to the UnityObjectNullHandlingAnalyzer
The text was updated successfully, but these errors were encountered: