- Home /
Question by
Chemaydacrafta · Jan 01, 2015 at 01:20 AM ·
physicsinspectorfield
No "Jump Speed" Variable in C# Script Component
Hi, I am having trouble trying to understand why I don't see the Jump Speed variable inside of the C# script component. The tutorial I am using is https://www.youtube.com/watch?v=1Hl3PIFJvm8
My MonoDevelop code:
using UnityEngine;
using System.Collections;
public class BouncingBallScript : MonoBehaviour
{
public float jumpSpeed = 10;
void Update ()
{
if (Input.GetButtonDown ("Jump"))
rigidbody.AddForce(0, jumpSpeed, 0);
}
}
capture.png
(4.8 kB)
Comment
Delete the script, and re make it. This time type it manually.
Ensure you have saved your script in $$anonymous$$onoDevelop, give it a build, go back into Unity.
If that doesn't work, reset the script from the cog.
Answer by shriya · Jan 01, 2015 at 06:44 AM
Check for any errors in the console. Rectify it and then this variable will appear in inspector