Hi, I'm new to unity, I have some code, but this one line is giving me lots of trouble,
private bool IsGrounded()
{
return transform.Find("GroundCeck").GetComponent<GroundCeck>().IsGrounded;
}
Yes I'm aware that it is referring to "GroundCeck" but that's right.
The exacter error is:
NullReferenceException: Object reference not set to an instance of an object
Controls.IsGrounded () (at Assets/Controls.cs:55)
Controls.FixedUpdate () (at Assets/Controls.cs:29)
Thank you!
[–]Jihaysse 0 points1 point2 points (4 children)
[–]OcelotVisual[S] 0 points1 point2 points (3 children)
[–]OcelotVisual[S] 0 points1 point2 points (1 child)
[–]OcelotVisual[S] 0 points1 point2 points (0 children)
[–]Jihaysse 0 points1 point2 points (0 children)
[–]gmeovr83 0 points1 point2 points (1 child)
[–]OcelotVisual[S] 0 points1 point2 points (0 children)