access another script from FirstPersonController

Viewed 1130

sorry for my English!

I have scripts called "MYJoystick.cs":

 public class MYJoystick : MonoBehaviour 
 {
     public static string myX;
 }

and I want to access "myX", from "FirstPersonController.cs" in unity 5. I want to write this in the Update in the FirstPersonController Like this:

 private void Update()
 {
      MYJoystick.myX += 1;
 }

but it says "The name `MYJoystick' does not exist in the current context".

How can I fix this? should i add Using In FirstPersonController? using what? what is the default namespace in unity? I also tried to add Namespace for my script, but it didn't work too!

1 Answers
Related