So i was doing some work in my script. I was following this tutorial: 5. How to make a 2D Platformer - CHARACTER - Unity Tutorial - YouTube Very well. When i saved it and played the game, it said
“All compiler errors have to be fixed before you can enter playmode”
Well… I cant see what’s wrong and im desperate for help!
Animator anim; // Reference to the player’s animator component.
Transform playerGraphics; // Reference to the graphics so we can change direction
void Awake()
{
// Setting up references.
groundCheck = transform.Find("GroundCheck");
ceilingCheck = transform.Find("CeilingCheck");
anim = GetComponent<Animator>();
playerGraphics = Transform.FindChild ("Graphics"); <-- Error (not in script)
if (playerGraphics == null)
{
Debug.LogError ("Let's freak out! there is no 'Graphics' object as a child of the player") ;
}
}
void FixedUpdate()
{
// The player is grounded if a circlecast to the groundcheck position hits anything designated as ground
grounded = Physics2D.OverlapCircle(groundCheck.position, groundedRadius, whatIsGround);
anim.SetBool("Ground", grounded);
Please help quick i’m really desperate!