isFinger down function problem.

The script is taken from js and implemented into c#, how can i fix this error?

JoyStick.IsFingerDown() is inaccessible due to its protection level

   if ( !rotateJoystick.IsFingerDown() )

Make the scope of your IsFingerDown() function from RotateJoystick to be ‘public’.

In JS default scope is public whereas in C# it is private. So you need to specify the scope of it to be public explicitly.

In JS the default scope modifier is public and in c# it is private meaning if you do not specify any scope modifier then it will be public (in JS) and private (in C#).

So just go to where you have defined your IsFingerDown method in your RotateJoystick script (guessing by the name ‘rotateJoystick’) and add public in front of your IsFingerDown() method.

It will be something like:

public bool IsFingerDown()
    // All your code that handles it

Here bool is an assumed return type and I have just added public in front of it as scope modifier.