Question by
Zebbi · Jan 18, 2021 at 07:57 PM ·
scenescene-loadingscenesscene load
How to check when current scene has loaded?
Is there a way of checking if the current scene is loaded? I've tried creating an event but it doesn't seem to do anything:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneMagic : MonoBehaviour
{
Scene thisscene;
void Start()
{
thisscene = SceneManager.GetActiveScene();
SceneManager.sceneLoaded += OnSceneLoaded;
}
void OnSceneLoaded(Scene thisscene, LoadSceneMode Single)
{
//here
}
Comment
When the Awake
/ Start
method of a $$anonymous$$onoBehaviour is called, it means the scene is already loaded.