Creating UI buttons - button as a component instead of standalone
i am using unity 2020.1.7f1 and sometimes when i want to create a button it does the expected and it creates a button game object completed with image and stuff , and other times it creates the button as a component of the canvas (or any highlighted game UI object ) i tried looking for documentation about this but all i could find is old info
my question is how can i choose when i want a standalone button and when i want my button as a component ? is this a normal behavior or is it a bug
Answer by Omar-Almasri · Oct 05, 2020 at 11:02 PM
in Unity there exist 2 menus one called " game Object " and other called " Component "
if you want to create a Game object button that comes with image and button component use the game object menu
if you want to just add a button component to game object use the component menu this way you get the expected behavior from each menu you want accordingly
apparently i never knew that a component menu exist at the top because i was either right clicking the object to add component or using the add component button in the inspector , well now i know .
Your answer
Follow this Question
Related Questions
Buttons work in the Editor but not in the build... WHY! 0 Answers
Unity The buttons do not catch the finger speed. 0 Answers
Tweening tutorials for hover over button animation? 0 Answers
button pressing the button next to it?! 2 Answers
How to make button rotate when another button is pressed? 0 Answers