Unity messages should not be flagged as unused because Unity invokes those messages.
IDE0051 - Remove unused private members
using UnityEngine;
class Camera : MonoBehaviour
{
void Start()
{
//Some code
}
void Update()
{
//Some code
}
}The IDE cannot find any references to the methods Start and Update, and believes them to be unused.
Even though the IDE cannot find any references to Start and Update, they will be called by Unity, and should not be removed.