Hello all,
Can’t get it right.
Please take a look at this code:
private IEnumerator FillBar()
{
timer = 0f;
while(timer<fillTime)
{
timer += Time.deltaTime;
myImage.fillAmount = timer / fillTime;
...... [things happening here]....
}
ChangeSphere (); //CANT GET THIS RIGHT!
}
public void ChangeSphere(Transform nextSphere)
{
//Start the fading process
StartCoroutine(FadeCamera(nextSphere));
}
After the coroutine is finished I want to call “public void ChangeSphere” but I don’t know how to pass this call. I tried: ChangeSphere (nextSphere)
but I get “nextSphere is not familiar”
Please tell me how do I call such functions with variables.
This is a first grader’s question that cant seem to sink in.
THANKS!