Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 713 Bytes

File metadata and controls

33 lines (23 loc) · 713 Bytes

USP0003 The Unity runtime invokes Unity messages

Unity messages should not be flagged as unused because Unity invokes those messages.

Suppressed Diagnostic ID

IDE0051 - Remove unused private members

Examples of code that produces a suppressed diagnostic

using UnityEngine;

class Camera : MonoBehaviour
{
	void Start()
	{
		//Some code
	}

	void Update()
	{
		//Some code
	}
}

Why is the diagnostic reported?

The IDE cannot find any references to the methods Start and Update, and believes them to be unused.

Why do we suppress this diagnostic?

Even though the IDE cannot find any references to Start and Update, they will be called by Unity, and should not be removed.