Global layer -feature request

I Think global layers will be a pretty neat feature to have in gdevelop.
I could manually create the layers, but that takes some time.

for example, in my game, the dialogue box always appears in a new layer called “UI” so it never overlaps with the player when he has a high Z value, and other objects, so instead of creating the UI layer scene by scene.
I saw some people talking about having external layouts but that doesn’t actually work, well it Does spawn the objects but it just creates them in the base layer.

suggestion for the way to implement:
maybe create an “layer reference” in the properties panel so it always creates the layers when creating a new scene

: D

2 Likes

So, external layouts do work for this purpose, the only issue is that you need to add the layer (“UI” layer in your case) manually to each scene where the layouts are used.
If you are using this to build game levels, it can be a good idea to make a template level scene that you duplicate and customize for each new level.

but, wouldn’t it be easier to have the layer created directly when creating a new scene?

If you put the objects on a UI layer in the external layout, then that’s the layer it will appear on in the scene. This is because the external layout need is based on an existing scene, so that scene will need the UI layer. If you add the layer to the external layout, it will get added to the base scene.


You’re forgetting games have title, menu, settings, pause and game-over scenes to name some. You probably don’t want those to automatically have the global layer added.


What happens if you change the objects in that layer? Should the changes be reflected in the global layer? What if this messes up the other scenes? Should you be able to change the object’s layout in the new scene?

As @Gruk mentioned, create a template scene with your UI layer and objects already in it, and duplicate it when you need to create a new scene.

1- ye

2- when I said global layer I mean it only will refresh the layers when a scene is created for example creating a new scene, it will copy the layers from the properties panel and add them to the scene, and if you deleted it it wont affect anything else

3- no in the properties panel it will show tell you to enter a list of strings separated by coma so when a scene is created it won’t have any objects created in it, it will only add the layers.

-potato

hi,
would like to have that “global layer” feature, too.
at the moment i want to create a menue which toogles down by clicking a hamburger symbol.
and of course this layer has to appear in each scene.
at the moment there is no option for that (or is it?).

so please, dear developers, please add that “global layer” feature in the future.
it would be helpful.
thanks in advance.

and:
merry christmas for all forum members.

As mentioned in the posts by MrMen and Gruk there are ‘external layouts’. You can read what it is here:

and here in the wiki:
https://wiki.gdevelop.io/gdevelop5/interface/scene-editor/external-layouts