- Home /
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 :)
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;
}
}
Answer by CardboardComputers · Aug 13, 2020 at 12:52 PM
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.
Your answer
Follow this Question
Related Questions
need particle help 1 Answer
Can someone explain 'Using ..." and "MonoBehaviour" in C# 7 Answers
Unity Scripting armv7 Error 1 Answer
Good or Bad ending 1 Answer
Script that switches between first and third person controller 3 Answers