I have some code that makes a verticalProgress bar appear in the same place as the health bar. I'd like to make it appear behind the health bar, but the health bar is verticalprogress : BaseScreenComponent : IDisposable, and is not inheriting from MonoBehavior, so It doesn't have an OnGUI method, so it can't benefit from GUI.depth like MonoBehavior objects can. Is there a way around this?

I want to see if I can program a damage indicator behind the health bar (non-directional, just an amount). So you lose health, the health bar goes down, and you see a red color bar where the health bar was, and then the red space shrinks to match the size of the health bar after a split second. Some games do something like this nowadays.

I have some code that makes a verticalProgress bar appear in the same place as the health bar. I'd like to make it appear behind the health bar, but the health bar is verticalprogress : BaseScreenComponent : IDisposable, and is not inheriting from MonoBehavior, so It doesn't have an OnGUI method, so it can't benefit from GUI.depth like MonoBehavior objects can. Is there a way around this?

I want to see if I can program a damage indicator behind the health bar (non-directional, just an amount). So you lose health, the health bar goes down, and you see a red color bar where the health bar was, and then the red space shrinks to match the size of the health bar after a split second. Some games do something like this nowadays.

It looks like if i add the component to the parent in a different order, the red bar appears behind the health bar.