- Home /
How do you Instantiate a button as a child object of a canvas?
I have a problem where when I instantiate a button as a child object of a canvas it will default to its anchor point and will then be cut in half at the bottom of the screen. The reason I need to do it this way is because when I instantiate the canvas itself with the button already as a child object, it doesn't save all of the information on the button for some reason. When I instantiate the button by itself however, it retains all of the information I put in it. I don't know how to go about changing the position on the canvas that the button will instantiate at. Can somebody offer a bit of help?
Your answer
Follow this Question
Related Questions
Hidden Canvas, doesn't disable interaction with buttons. 1 Answer
Canvas to Canvas In one Scene 1 Answer
Creating Buttons with a C# Script 1 Answer
Instantiate prefab text into Canvas 2 Answers