#UI Overlay Layering
1 messages Β· Page 1 of 1 (latest)
aight
That chat is driving me nuts. So, first ctrl z back to your correct transform values.
But I guess, they get overriden anyway when instantiated
If I ctrl Z it also put the renderer back to world space. I'll just input the transform values again.
But now I don't have the sorting layers...
Show your inspector again
Remove the renderer ! π
Okay, so what did you open. the PilePreview. Is it a prefab?
it is
Can you show the inspector and hierarchy when its being loaded?
Oh, all my prefabs have a canvas renderer, that's funky
I'm specifically trying to get the preview over the end turn button
Well that is wrong that they have a renderer π That should not be the case
Why the heck is it all green... π I could never work with that π Okay. So can you put your prefab in edit mode into the place where it should be, remove the renderer and then make a new prefab out of it or override it?
huh, all my objects have one actually
Ohhh, well... somethings going on here thats not meant to be.
I didn't add them that's for sure, they're here by default
Does your root canvas have a renderer?
yup
I still can't remove the renderer because of Image (script), whatever that is
Can you show your root canvas inspector?
Well that looks right. I just think that all your child objects are basically their own UI system within itself
So I should rework it all so that all the renderers are gone ?
Sounds like. Just make a new unity UI for testing. then add an empty gameobject to it and add an image component
a new unity UI ?
Right click in hierarchy, UI Canvas, but be sur eto not select any gameobject, so it gets on root of the hierarchy
Oh, ok
I added an empty to a new canvas, and yeah when I add an image a renderer just pops
What the heck π
No wait, I guess this is okay, just checked, it can work with or without that.
Well that's a relief
Okay, lets ignore the renderer for now. I tmight be okay to have it in.
So what about if you add canvas to it
What does the component look like for you?
Oh boy, yeah I am sorry about the renderer, just chcked. most of my system is dynamic, so I barely had any image, but those i have, have a renderer. I guess visual stuff like image needs it. so ignore that renderers are bad on children π
If I add a canvas to what ?
to your previewGameobject. the prefab you instantiate
There it is, override sorting
The problem is that it doesn't at all look like that from the prefab itself
Oh because of prefab mode
thats unity π
the gift that keeps on giving
welp, I suppose it should work now, but I'll test once I've fixed another issue : when I make the window bigger, everything moves around like mad and it is very inconvenient. I'll tell you if that works once I can test it x)
You should really look into relative positioning.
Instead of setting your position in your prefab, calculate it when instantiating. So take your pile button for example and plus vector2 to position it, so it will always be placed at the correct place
Yeah that's what I do
It's unrelated, I guess I'm just instantiating things wrong
I suppose so, though I don't know what either of those are. I'll figure it out.
Alrighty, then I leave the thread here, alright?
Okay !