Load scene impossibly slow

hey guys

I’m creating a game where, if a set timer runs out you get a screen with a button to restart the current level

    void TaskOnClick()
    {   SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
        Start();
    }

the problem however is that the reload time is really long and it can take up to 15 seconds to reload a simple level.

any suggestions?

cheers,

Ganoash

Not sure - how simple is simple? :slight_smile:
A truly simple scene would load almost immediately.

PS. Your call to “Start()” after loading the scene is never reached, so no need to have that there.

1 Like

well for some reason my scene isn’t loading fast enough, are there any workarounds? and the call to the start function does actually get reached since all the UI counters only get reset when I include the start function.

Interesting. They aren’t reset because of the Start functions that get called when the scene loads, then?

It’s sort of impossible to say if there are work-arounds to your slow loading scene. There might be… First, we’d have to understand what your scene is doing to see if anything can be improved upon :slight_smile:
Like anything else… there could be improvements… up until the point where it’s the best you can do :wink:
I’m not an expert on every enhancement, but if you explain what your scene has/does and so on, perhaps me (or someone else) will have an idea for some suggestions/feedback. I think this is too vague, as it is…

1 Like

Yep, just saying your scene loads slow is not going to help. But, one possible reason is what you have going on in Awake() calls, how many need to run, etc.

The other is just what’s in your scene. How many objects, what quality are things, etc. Really, we can assume a lot. My best suggestion is run the profiler and see if you can get some info from it or post the results on here.

hmm I posted a way more detailed description of my game but it seems like the moderators aren’t going to be looking at it anytime soon. I also seem to have found a solution by adding an EventSystem to the UI. I don’t know how the button was even working without one but it it is running way smoother now.
thanks to the both of you for taking the time to reply to this thread.

cheers,

ganoash

Hey, glad ya got it working :slight_smile: