Hello I learn unity since a week I realized more than 10 hours of learning but here I bug on a piece of code that I saw:
private string _currentLevelName = string.Empty
void LoadComplete(AsyncOperation ao)
{
Debug.Log("Chargement terminer !");
}
public void LoadLevel(string levelName)
{
AsyncOperation ao = SceneManager.LoadSceneAsync(levelName);
//Is here :
//ao.completed += LoadComplete;
_currentLevelName = levelName
}
I do not understand : ao.completed += LoadComplete;
Explain in detail what this does please !!
Thanks !