ローディング画面

移動前のシーンと 移動後のシーンを作り
移動前のシーンに以下のスクリプトを入れます

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

public class Loading : MonoBehaviour {
 
 //シーンを変更するコルーチン
 
public IEnumerator SceneChange(){
  // 非同期でロード開始(Sceneと言う名前のシーンに移動する)
  AsyncOperation async = SceneManager.LoadSceneAsync("Scene");
  // 非同期読み込み中の処理(ここにローディング画面を入れる)
  while (!async.isDone) {
   Debug.Log(async.progress * 100 + "%");
   yield return null;
  }
  yield return async;
 }
}

そうしたら Build Settingsに移動先のSceneを登録します

後は上記のコルーチンを実行すれば ローディングができます

もしローディングを一時停止したい場合
async.allowSceneActivation= false;
で 止めることができます

戻る