public void Start() { /*Plane groundPlane = (Plane) GameObject.FindObjectOfType(typeof(Plane)); * if (groundPlane == null) Debug.LogError("Plane not found. Please add a plane mesh to your stage prefab!");*/ groundLayer = LayerMask.NameToLayer("Ground"); groundMask = 1 << groundLayer; myControlsScript = GetComponent <ControlsScript>(); character = myControlsScript.character; myHitBoxesScript = character.GetComponent <HitBoxesScript>(); myMoveSetScript = character.GetComponent <MoveSetScript>(); appliedGravity = myControlsScript.myInfo.physics.weight * UFE.config.gravity; walkSpeed = myControlsScript.myInfo.physics.walkSpeed; runSpeed = myControlsScript.myInfo.physics.runSpeed; }