Weird phantom global layers!?

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • Hi all! Just opened my current project today and found something weird with my global layers (two extra phantom layers have appeared):

    What is this actually? Never seen this before...

    Another question is - I just renamed another global layer, and now I need to rename it on a-a-all 40 layouts... Don't you think it is also weird stuff?

  • Bump!

  • The editor now shows you the sub layers of the original global layer. Those sub layers are grayed out because they don't belong to the current layout, so allowing them to be interacted with would likely have a lot of unexpected behaviors.

    The editor now also shows you any sub layers a layer might have, but are not being shown because the parent is a global layer and instead it is showing the global sub layers of the parent. Those are shown with the crossed out eye icon to indicate they are not visible. They are also given the -1 index to reflect how they would react at runtime if their index was to be queried using the LayerIndex expression.

    All of that was added because of this github.com/Scirra/Construct-bugs/issues/8532

    The main problem in that report was the editor was showing different layer indexes to the runtime when working with global sub layers.

    I guess this can be confusing if the layers that take the -1 index also have the same name as the original global layer's sub layers.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks DiegoM, oh... so I can just delete those extra sublayers with indexes -1, ok. But I still don't understand why editing global layers on any layout where they are is not allowed? It seems logical or I missed something?

  • It's to avoid unexpected problems.

    The layers bar was originally made to work with the layers of the current layout. Showing layers from other layouts and also being able to edit them normally will most certainly run into all kinds of subtle problems. Showing them and not allowing to edit them is a middle ground, so you can at least see if there are layers from another layout being shown in the current one.

    Global layer items have a context menu option to open the layout of the original global layer, so if you want to edit those layers, you can quickly find the layout they belong to.

    As for deleting the layers with a -1 index, I think that should be ok as in most cases once you make a layer global, you don't care too much about what it was showing previously.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)