In the following Unity/C# code, the collider
variable produces the following warning:
Warning CS0108 'Controller2D.collider' hides inherited member 'Component.collider'. Use the new keyword if hiding was intended.
What does this mean and how do I fix it?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// require that our object has a box-collider-2d component
[RequireComponent(typeof(BoxCollider2D))]
// controller-2D script
public class Controller2D : MonoBehaviour {
// stores a reference to our object's box-collider-2d component
BoxCollider2D collider; // the warning occurs here
// ...
}