Hello, trying to make a loading bar for ym game but what is NotImplementedException: The method or operation is not implemented. loadingScene.UpdateProgessUI

Helplo, trying to make a loading bar for ym game but what is NotImplementedException: The method or operation is not implemented. loadingScene.UpdateProgessUI

however my bar isnt moving and not showing my loading progress :slight_smile:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using System;

public class loadingScene : MonoBehaviour
{

    public Slider SliderSLD;
    public AsyncOperation operation;
    public SceneManager Scene;
    public string sceneName = "level00";
    // Start is called before the first frame update
    void Start()
    {
     
        UpdateProgessUI(0);
        StartCoroutine(LoadingBarIE());

    }

    private void UpdateProgessUI(float progress)
    {
        throw new NotImplementedException();
        SliderSLD.value = progress;
    }

    // Update is called once per frame
    IEnumerator LoadingBarIE()
    {
        operation = SceneManager.LoadSceneAsync(sceneName);
        while (!operation.isDone)
        {
            UpdateProgessUI(operation.progress);
            yield return null;
        }

        UpdateProgessUI(operation.progress);
        operation = null;
    }



}

I don’t know where you found this code, but you were supposed to fill in the blanks:

     private void UpdateProgessUI(float progress)
     {
         throw new NotImplementedException();
         SliderSLD.value = progress;
     }

Specifically, your NotImplementedException is coming from the uh, part that says throw new NotImplementedException();. The sample code you got it from was probably asking you to provide some implementation for that UpdateProgressUI function.