Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

A-Sync loading UI

A topic by CalumMcManus created Feb 27, 2017 Views: 369 Replies: 4
Viewing posts 1 to 5

Just wondered what people thought of the A-Sync loading of a UI Scene into the game as it is in hte base project.

A-Sync scene loading is great for large scale games but using it simply to load in a scene with a UI Canvas in seems a bit much. the only way I can see it being of use is if you have lots of scenes all with the same UI but then using DontDestroyOnLoad works just as well.

Maybe I am missing something?

Hi Calum,

I always split my scenes up because I always assume they will need to be at some point in the future and it is often easier to do this up front than it is to retrofit in later.

When you have multiple people working on a project it is a good idea to split up the data into multiple scenes to avoid conflicts. This way different people can make edits to different scenes without having to resolve conflicts. Even though the scenes can be set to save in text format, conflicts can still be a nuisance and are not always easily resolved. This is also true for a single person developing where they decide to work with branches and end up editing the same scene in different branches.

Additionally, the size of the launch scene dictates how long you sit on the splash screen for. Therefore keeping this initial scene as small as possible is good practice to help your game load in as quickly as possible, this is especially true when running on mobile. As soon as you are past the splash screen your own code is executing and you can control exactly what the player sees as you load in the rest of the games resourses.

Lizi

(1 edit)

Hi Lizi,

I never thought about using this to make better use of source control, definitely something I will take from this!

As for loading in like this to avoid slow downs on start, would you say this makes a large difference with UI scenes? As I understand it loading in scenes is quite heavy in itself.

At the moment my first scene is entirely a UI Canvas as it is a lobby for my multi player but I will try and make my in-game UI work in this way :)

Thanks!

Calum.

Hi Calum,

It isn't just your canvas loading in if you have UI set up in your load scene, it will also be loading all the resources that are referenced in that scene as well including textures.

The key here is control, as a programmer I like to have control over what the player sees as much as possible, that initial load into the first scene is a period of time where I only have limited control over what the player sees: a static image. So I like to minimise the time that the static image is shown and instead load in a super small start up scene, I then show an animated load screen whilst everything else loads in. This is a better experience for the user because they can see something is happening and that the app hasn't crashed.

Does that make sense?

Lizi

Hi Lizi,

Yes thanks that helps! I have done my best to use this way of doing it, although it makes it slightly harder to set up UI elements such as buttons as you can't just assign a function directly to the button instead the UI managers need to handle everything by getting access to scripts from the other scenes. But the loading times are already visibly faster!

Thanks again!

Calum.