JetBrains Rider 2025.3 Help

Code inspection: The tag is not defined in the 'Tags & Layers'

This inspection reports tag names that are not defined in Unity's Tags & Layers settings.

This inspection is shown for APIs such as CompareTag(...) and GameObject.FindWithTag(...), and also when code compares a tag property to a string literal. If the tag does not exist, the call will not behave as intended at runtime.

Example

In this example, the "Boss" tag is used, but it is not defined in the project settings.

using UnityEngine; public class Example : MonoBehaviour { private void Start() { // Reported: "Boss" tag is not defined in Tags & Layers if (CompareTag("Boss")) { } } }
using UnityEngine; public class Example : MonoBehaviour { private void Start() { // Use a tag that exists in the project if (CompareTag("Player")) { } } }

Quick-fix

This inspection does not provide a dedicated quick-fix. Fix it manually by correcting the tag name or by creating the missing tag in Unity.

26 March 2026