Ok, I'm not sure how everyone around me can't seem to repro the problem but I found a work around that I don't quite understand yet. I found that I can reproduce the issue super easily but creating a button and during run time, just checking and unchecking active check mark in the editor. When I do this, the button disappears and when it is activated again, it doesn't actually render.
So I tracked down the issue to the UIButtonScale and UIButtonOffset scripts. More specifically on the OnEnable() and OnDisable() handlers
// UIButtonScale
void OnEnable ()
{
if (mStarted && mHighlighted)
OnHover(UICamera.IsHighlighted(gameObject));
}
void OnDisable ()
{
if (tweenTarget != null)
{
TweenScale tc = tweenTarget.GetComponent<TweenScale>();
if (tc != null)
{
tc.scale = mScale;
tc.enabled = false;
}
}
}
// UIButtonOffset
void OnEnable ()
{
if (mStarted && mHighlighted)
OnHover(UICamera.IsHighlighted(gameObject));
}
void OnDisable ()
{
if (tweenTarget != null)
{
TweenPosition tc = tweenTarget.GetComponent<TweenPosition>();
if (tc != null)
{
tc.position = mPos;
tc.enabled = false;
}
}
}
I noticed that the components set the scale to mPos which is (0,0,0), OnDisable() as well as setting the local position to (0,0,0) as well. When the button is enabled again I went to look at the properties and there it was, the button's scale was 0. If I restore it to 1 I can see the button again but it isn't in the correct spot. (You can verify this by debugging and seeing that mPos is set to 0,0,0 as well as mScale)
As for a work around I found that if I remove the TweenScale script as well as the TweenPosition script from the button, you can disable and re-enable the button and it will appear correctly and continue to function correctly. This seems to work fine because the components are added to the button as soon as they are needed. I haven't tied the two together at the time that I write this but I may spend some time looking into it.
Also, if you look at one of the first screen shots I posted, you can see the scale being 0. Are any of the devs around to verify the logic of how this should work?
http://www.evil-lab.com/unity/StarshipCommand/1_UIButton.png