unity wait until bool is true code example
Example: unity wait until bool is true
public class MyClassA
{
private MyClassB _myClassB = new MyClassB();
private bool IsReadyToContinue()
{
// i need to wait "isReady" here
// then return true
return false;
}
}
public class MyClassB
{
public bool isReady;
private void DoSomething()
{
// load resources and change the bool to true
isReady = true;
}
}