Gui layers for whole project [DEF-1557]

I use same layers in all my gui files. It will be awesome if i can set layers one time. Now i created same layers for all my gui files. Also how layers work for different gui files? Layers set draw order only for one gui file?

As far as I know draw orders are for one gui. If you want to have a lot of scenes that you want to shares draw order you will have to import them as templates into a parent gui scene.

If you have a scene that have a lot of dynamic scenes that are created you should create them into a parent gui scene before adding that into a collection. That way they will batch and share layers.

Thx. What about layers for whole project. The problem is that when i have gui template with layers, if i add this template to gui, i have errors becouse gui doesn’t contains layers. I can fix it by adding layers to gui. But it will be awesome if when i add template, the node from template adding to gui too.

I agree with you that I think that layers should be imported with templates and have asked the Defold team about this their response where: “It would be really difficult to make an educated guess when libs of templates are imported. They will no doubt clash if used at all. You either guarantee an automatic solution will work or keep it manual.”

But there exist a ticket to at least get a option for it. :slight_smile: Maybe if more people want it we can get it bumped a bit on their prio.

1 Like