Warning CS0108: 'PlayerPhysics.collider' hides inherited member 'UnityEngine.Component.collider'. Use the new keyword if hiding was intended. (CS0108) (Assembly-CSharp)

I have an error “Warning CS0108: ‘PlayerPhysics.collider’ hides inherited member ‘UnityEngine.Component.collider’. Use the new keyword if hiding was intended. (CS0108) (Assembly-CSharp)” some help, please? :smiley:
using UnityEngine;
using System.Collections;

[RequireComponent (typeof(BoxCollider))]
public class PlayerPhysics : MonoBehaviour {
	
	public LayerMask collisionMask;

	private BoxCollider collider;
	private Vector3 s;
	private Vector3 c;
	
	private Vector3 originalSize;
	private Vector3 originalCentre;
	private float colliderScale;
	
	private int collisionDivisionsX = 3;
	private int collisionDivisionsY =10;

If you look at the reference page for GameObject you will see that ‘collider’ is one of the variables. This variable is a shortcut to get the current collider on the game object. It allow you to do:

collider.enabled = false;

…without any GetComponent(). Under the hood, Unity is doing for you:

GetComponent<Collider>().enabled = false;

The problem with your code is that you are using ‘collider’ as one of your variable names. By doing so, you are hiding/redefining the ‘collider’ variable used as part of a game object. The solution as suggested by @tanoshimi is to rename your variable.