Sometimes when making a variable public for class interactions it doesn’t make sense for it to be settable in the inspector - e.g we don’t want to be able to change the ball in play state there. To prevent this [HideInInspector] can be placed above the declaration.
[HideInInspector]
public bool inPlay = false;