Call Funtion or get Variables form another Script ( C#)

I have a C# script :

using UnityEngine;
using System.Collections;

public class MyCSharp : MonoBehaviour {

// Use this for initialization

public bool soundOnOff;
}

and SelectScene script (C#).

How can i get the variable soundOnOff from MyCSharp in SelectScene script;

Typically you would acquire a reference to the game object or component in question, and then access the variable (directly or indirectly) via that reference.

You can find some info on accessing other game objects in the scene here.

In your SelectScene script, you would do the following:

MyCSharp soundScript = GetComponent();
if (soundScript.soundOnOff == true)
{
//…
}

That assumes the components are associated with the same game object. (They very well may be, but the OP didn’t specify one way or the other.)

thanks !!!

What if it is not in the same object?

Then you’d first need to acquire a reference to the object containing the other script (see the link included in my first reply for examples of how this can be done).