JetBrains Rider 2025.3 Help

Code inspection: Parameter should be derived from 'Component'

This inspection reports a [DrawGizmo] method whose first parameter is not derived from UnityEngine.Component.

Unity expects [DrawGizmo] methods to be static methods that take a component type as the first parameter and GizmoType as the second. If the first parameter is something else, Unity cannot use the method as intended.

Example

In this example, the first parameter is GameObject, which is not a component. The correct signature should use a component type, such as Transform.

using UnityEditor; using UnityEngine; public class Example { [DrawGizmo] public static void DrawForObject(GameObject target, GizmoType gizmoType) { } }
using UnityEditor; using UnityEngine; public class Example { [DrawGizmo] public static void DrawForObject(Transform target, GizmoType gizmoType) { } }

Quick-fix

This inspection does not provide a dedicated quick-fix. Fix the method manually by changing the first parameter to a type derived from Component, such as Transform, Collider, or your own MonoBehaviour.

26 March 2026