Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am using Unity 5 and the built in GUI tools. My static GUI shows up just fine which makes me think it's not a text/font issue or some such. Again, it all looks good in the Unity editor when I hit Play.

I have tried the different canvas options as far as what space to work in and how to scale. I have messed with the build options. I have tried turning batching off. I have tried building for Android 4 through 5. (Ice Cream, Jelly Bean, etc) I have tried turning dynamic text on and off. I have ensured the Buttons and text are made to be children of the canvas. I have only uploaded the game onto my Galaxy Note 4. I moved my background texture out of screen space in case it somehow covered the buttons on Android.

https://www.youtube.com/watch?v=Hk1UjXwOR08

share|improve this question
1  
Instead of "I'm having a problem, are there any tutorials that cover this subject" you should add additional details about the exact problem you're dealing with now and what you've done to try to solve it. It sounds like you should get more error logging to give you additional information. –  Byte56 2 days ago
    
Done and done. Almost completely reworded. –  Sluggernot 2 days ago
    
Given that you say these buttons and text are generated in code, is it possibly as simple as code that runs in the editor but not on device? –  jhocking 2 days ago
    
It appears to be that way, yes. Why would that happen? Byte56 says I need more error logging and I believe he is right. I will set up a static text box and... if my scripts wont run.. mind melt. I would write an error logging script but my scripts may not be running. –  Sluggernot 2 days ago
    
One guess: you'd have to set these up deliberately, but maybe you did and forgot? docs.unity3d.com/Manual/PlatformDependentCompilation.html –  jhocking 2 days ago

1 Answer 1

up vote 2 down vote accepted

Bug reported:

Unity does not appear to generate UI elements upon Start. User input, or possibly some arbitrary amount of time in necessary until the application/game will generate the UI elements.

I made my app wait to generate the buttons until I hit a button and it worked as intended.

I suspect generating the UI from the Update() func would work properly. I would just need to add a bool check for initialization statements

share|improve this answer
    
good catch, tricky use case. Try Invoke() from Start() to see if waiting a bit works. –  jhocking yesterday
    
As soon as I am home, I will do this. –  Sluggernot yesterday
    
Invoke does not appear to help. Tried 3 seconds. –  Sluggernot yesterday
    
Also 5 seconds. No worky. Surprised im the first to notice. Which is why I still have the inkling I'm just being stupid somewhere. –  Sluggernot yesterday
    
Well, I can't imagine many other people are generating the new UI elements from code. In fact, I didn't realize you could. I'd love to see you edit in some of that code into the original question... –  jhocking yesterday

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.