R
R
Roman2017-09-20 17:14:33
C++ / C#
Roman, 2017-09-20 17:14:33

Ugly buttons in Unity2D and how to improve them?

Hello! Don't throw stones, I'm just learning( The
question arose how to add normal buttons to the scene (and not what Unity creates with new rect (///)) + they are more convenient to arrange, as for me. And how to add them to the script? I know about Button Name = New Button; (or something similar), but where to put it (as in the case of a script where we create a button ourselves. Where? To an empty object?) and sometimes it does not work.
Also, the question is, if I want to make a menu (appearing-disappearing), then I need to make a Boolean variable into which to fill in Name.OnClick, constantly check it and based on it already show / hide menus? Then do the same with clicks on missing buttons? Check Button. OnClick and a boolean variable, or does the principle work - I can't see, therefore I can't click?
And yet, if these seemed easy to you - what to do with the slider?
PS I know about the UI, but it's ugly and incomprehensible.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GavriKos, 2017-09-20
@ananas_roma

I mean UI is ugly? You create it through the GameObject->UI->Button menu and replace it in the Image component with the beauty that you need. Through the script - in approximately the same way - you create a game object, add Button, Image components and so on to it.

S
Sergey, 2017-09-20
@sergey_kzn

Let me leave this lesson here: https://www.youtube.com/watch?v=QxRAIjXdfFU
Quite old, but interesting

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question