Skip to main content

Here's the process to figuring out what's causing the issue.

  1. Confirm that the ClickedClicked method is run. I suggest just putting a Debug.Log()Debug.Log() statement there. Debug.Log(command); would be perfect, because it also lets you know the command.
  2. If your ClickClick method isn't being run, most likely something else is taking that click. Look for other objects that might be intercepting the click in front of it (Might not be visible).
  3. If the correct command is received, then you should probably use .equals() for comparison. For instance, command.equals("again")
  4. You might consider using separate functions for each. There's a proposal to use enums, but so far as I know, that's not accepted yet.

Here's the process to figuring out what's causing the issue.

  1. Confirm that the Clicked method is run. I suggest just putting a Debug.Log() statement there. Debug.Log(command); would be perfect, because it also lets you know the command.
  2. If your Click method isn't being run, most likely something else is taking that click. Look for other objects that might be intercepting the click in front of it (Might not be visible).
  3. If the correct command is received, then you should probably use .equals() for comparison. For instance, command.equals("again")
  4. You might consider using separate functions for each. There's a proposal to use enums, but so far as I know, that's not accepted yet.

Here's the process to figuring out what's causing the issue.

  1. Confirm that the Clicked method is run. I suggest just putting a Debug.Log() statement there. Debug.Log(command); would be perfect, because it also lets you know the command.
  2. If your Click method isn't being run, most likely something else is taking that click. Look for other objects that might be intercepting the click in front of it (Might not be visible).
  3. If the correct command is received, then you should probably use .equals() for comparison. For instance, command.equals("again")
  4. You might consider using separate functions for each. There's a proposal to use enums, but so far as I know, that's not accepted yet.
Source Link
PearsonArtPhoto
  • 1.5k
  • 1
  • 15
  • 26

Here's the process to figuring out what's causing the issue.

  1. Confirm that the Clicked method is run. I suggest just putting a Debug.Log() statement there. Debug.Log(command); would be perfect, because it also lets you know the command.
  2. If your Click method isn't being run, most likely something else is taking that click. Look for other objects that might be intercepting the click in front of it (Might not be visible).
  3. If the correct command is received, then you should probably use .equals() for comparison. For instance, command.equals("again")
  4. You might consider using separate functions for each. There's a proposal to use enums, but so far as I know, that's not accepted yet.