Is there any way to add a component requirement to a prefab reference that is set in the inspector?
Essentially, I want to use the RequireComponent attribute on a GameObject reference rather than on a class.
Something like this:
public class Gun : MonoBehavior
{
[SerializeField][RequireComponent(typeof(Bullet)] GameObject bulletPrefab;
}