public class Example2:MonoBehaviour{
public static Example2 Instance;
void Awake()
{
Instance = this;
}
//Now you can access the public methods or variable of Example2 from any class by
Example2.Instance.YourMethodOrVariable;
}
//---------------------------------------------------------------------------------
//But if you have a Boolean in your Example1 and don't want to make a whole Instance of the class you can
public static bool example1ClassBool = false;
//then from any other class you can use
Example1.example1ClassBool = true;
}//---------------------------------------------------------------------------------