#Created child instance isn't following layering or depth rules?

1 messages · Page 1 of 1 (latest)

nocturne epoch
#

Hello! For my game that I'm recreating I have each generator that's unlocked have it's own "Buy" button underneath the generator.
Problem is when I use code to create the button instance in question and place it on the "Industries" layer, the button goes above everything.
I've provided some images that I hope helps it make it clearer what's going on and what I'm trying to do
Thanks!

mellow stirrup
#

depth and layer are the same duder, basically

#

so youre spawning it on whatever depth that layer is, then changing the depth

nocturne epoch
#

How do I adjust it then?

mellow stirrup
#

stop setting depth to 1

nocturne epoch
#

If I remove the IndustryBuyInstance.depth it goes behind the generator

mellow stirrup
#

that would be because that layer is

nocturne epoch
#

Is it better to make a new layer for buttons then?

mellow stirrup
#

might make this way easier yeah

nocturne epoch
#

Works a treat, thanks 😄