Hi, im looking for a way to detect if a ui element is in front of another ui element. One could think that this can be done using getSiblingIndex. However this only works if the objects are parented to the same gameobject. I also found the GraphicsRaycaster, but no example how to use it. Anybody here that can share his experiences on this topic?
Thanks
If your just wondering about renderable items (anything that has a CanvasRenderer on it) you can look at the relativeDepth or the absoluteDepth. If memory is serving me correctly relative is the order they are in the hierarchy, absolute is the order they are in after batching. either should do for your purpose.
thank you, that works very well