I created an UI button but click does not work.,I created an UI jump button but click does not work.
Hi everybody, I'm trying to make a simple Jump Button for my game, the problem is that when you click nothing happens, and without the button it works.
jump code:
public void Jump()
{
if (controller.collisions.below)
{
velocity.y = jumpVelocity;
Debug.Log("Jumped");
}
}
Comment
Your answer
Follow this Question
Related Questions
Button calls itself numerous times 0 Answers
How can i make a hold method for addforce? 0 Answers
Assigning a GameObject variable to equal another GameObject variable via C# script. 0 Answers
Text adventure game, how to change text in a specific way with C# 1 Answer
NullReferenceException: Object reference not set to an instance of an object error ? 1 Answer