As we did with the other scripts in this book, once again we need to enforce the components, so we can write:
using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(Rigidbody2D))] [RequireComponent(typeof(Collider2D))] public class BulletController : MonoBehaviour { //[...] }