GUI-template usage across Layouts/Display Profiles

So, I’ve noticed that “local” changes made to gui-templates in the ‘Default’ display profile are not saved across other display profiles (which kind of removes its purpose). Are GUI-templates supposed to work this way or is this a bug?

IE. Should I wait for a fix or should I go back to using regular nodes (and copy-paste)?

This is expected behaviour. When using templates, a node property uses the referenced (template) scene node property unless overridden. This goes for all layouts.
The Default display profile serves a purpose in that it is used if a scene is references that does not contain the layout of the scene it is references from (which we support, not the least to be able to build libraries of template gui scenes), and this can be quite useful.

It’s not completely straight forward to inherit both the layout default strategy and using templates at the same time, but we will discuss your problem to see what we can come up with.

In your case, I would suggest moving the template node that is the parent of your node, or if your node is further down the hierarchy, the default property of the base scene. Feel free to attach an example gui scene scenario with your problem.

Note: I am on holiday and will be back on the 10th of august.

Our case could be kind of specific, but I’ll try to explain it anyway.

Basically we have different maps of the game’s different worlds, like most mobile games, with 20 levels on each. Between each of these levels, we have paw prints that we animate when you’ve finished a level – Finishing level 1 makes the pawprints between 1 and 2 show up.

Each paw template consists of 4 paw print nodes and by using templates all referencing becomes easier, as the paws can have the same name.

Example: cat_track1/paw_1 and cat_track2/paw_1

Without templates we’d have to give every single paw print a unique name (right?); so we’d have paw_1 to paw_80, and we’d have to state to level_1 uses paw_1 to paw_4, level_2 uses paw_5 to paw_9 and so on… Which felt overcomplicated.

Also, as you can see on the image, each paw needs to be placed individually in order to follow the road, which is where our problem came up. Our thought was that we would only need to place the paws on their correct positions in the Default layout, since we thought the others would inherit those overriden values.

We we’re able to get around this, through a bug, I guess. If you are editing a layout that’s not Default, and then add a new layout, the new layout’s template nodes will inherit the values from your current layout, instead of the template’s standard values (which is exactly what we wanted).

I’ve noticed that this does not happen if you add layouts while editing the Default layout, so it doesn’t simply inherit the values from the layout ‘above’ in the hierarchy. So, in our case, we had to place the paw prints properly in the Default layout and a second layout; and then we were able to inherit values from the second one.

Hope that brings some clarity to our situation :smile: