There might be some other USS override hitting it somehow, although I would assume an inline style should override it regardless. Wierd, am not sure why your button is turning white. PS: Sorry that it took me so long to respond, I have not hat so much time for my game and Unity lately :/ It looks like I'll have to go with the hack after all. The button seems to consist of multiple visual elements, but they're not accessible. It is curious that I can show bits of the underlying pink UI element I have in the Builder by lowering the button's opacity: I can't even change that white rectangle's color. Instead, every time, as soon as I add a radius to the border, the button is overlayed by a white rounded rectangle, like so: Instead of 'hacking' by setting the overflow to visible, I also tried to tweak sizes and spacings on the button, but I had no success. I followed your suggestion and added a UI to my base scene and observe it in the game view while doing my changes in the builder. The explanation that different calculations are performed when showing the UI in the Builder versus those that are made in the game view explains the behavior of buttons and text fields. Thank you very much, JG-Denver, for your extensive response. But this requires jumping back to your Game view (I suggest having a UI doc rendering to a display so you can just have it open and you do have not to hit play to see the results for a static doc).Īs to the scaling, unless you change the default scaling in your panel presets, it should pretty much be the same between the Builder and Game view (see my previous response on scaling), it is just the specific elements I mentioned that are varying from what I can see. So I think this is just a deficit of the Builder for now.ĭoing the visual overflow can work to hack around the problem, but I just prefer to adjust my sizes, margins, etc. require their programmatic behaviors to have their final layout and this does not seem to be running in the Builder. I believe this is because elements like the buttons, sliders, foldouts, etc. Because of this, I have to adjust all my sizes and review them in the Game view to see the actual results. So I have had the same issue with the label text not displaying the same in Game view / player as in the builder. You are using a Button in your example, in my example, you can see the layout of the buttons is very different in the Builder than in the Game view in my screenshots. I don't think the issue has to do with your TSS. These may be known things or maybe there is something else to fix it you can find, but if not and your team wants, I will put together a repro project with just the basics and send or post it.Ĭlick to expand.Antoine will probably reply with a better answer, but let me share what I am seeing in case it helps. The UI builder is still very useful for many look-ups and changes, just not the final view. For now, I keep the Game window open to a display with the UI Document (even when not in play mode it refreshes) so I can refer back to it after changes for the final product (not including runtime elements of course). The general layout is OK most of the time, but specific element styles fall apart and sizes vary. It is still very different between the Game window/player and the UI Builder. I believe my display is probably already 96 DPI, so I would expect one. I see not change whatsoever in the Game windows. I switched to "Constant Pixel Size" with a scale of 1. My setting for Scale Mode was default of "Constant Physical Size" which has 96 DPI as the default. I have had the UI builder set to "Unity Default Runtime Theme" and the Panel setting to the same theme. Click to expand.Hi thank you for the reply.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |