,Hello, please help me. I am not the brightest at C# so my code has a lot of bugs. Usually I get them fixed but now I can't fix it. Can you fix it please?
*Error Message: error CS0120: An object reference is required to access non-static member `UnityEngine.Behaviour.enabled'*
using UnityEngine;
public class PlayerCollision : MonoBehaviour {
public static BoxMovement movement;
void OnCollisionEnter (UnityEngine.Collision collisionInfo)
{
if (collisionInfo.gameObject.CompareTag("Obstacle"))
{
BoxMovement.enabled = false;
}
}
}
↧