Screen Space - Camera : Not displaying button size correctly during play
Hello,
Let me start by saying I'm relatively new to Unity and have come decently far, but I'm having a very hard time finding a solution to the issue I'm having. Ive' done a large amount of searching for a solution with no success.
My issue is that my prefab buttons are incorrectly sized when the project is being ran. I've narrowed the issue down, from what I can tell, to the render mode *which is only affecting prefab buttons. Button's that are one-offs and not prefabbed, work just fine with no scaling issues.
The prefab buttons were created on the canvas and sized accordingly. When the game is playing, and buttons populate onto a panel that has a vertical layout group and a content size filter, they become exponentially larger than the canvas.
I normally use 2018.3.14f1 but with this issue, I even tried 2019.2.12f1.
Things that I've tried:
-Disabled the Graphics Raycaster on the Canvas.
-Left the Graphics Raycaster enabled, unchecked ignore Reversed Graphics.
-Resize the buttons to better fit which helps with the height, but not the width.
-*Attempted to adjust the anchor and pivot of both the button and the text (with no noticeable results)
-Changed camera to Overlay which seems to be more work adjusting and resizing a lot of other items which I PREFER not to do if possible.
I'm at a loss. MANY hours spent with no obvious solution. I greatly appreciate anyone who is able to help me. More images can be provided besides the example one I'm posting.
NOTE The image is suppose to be of three buttons just above the red boots on the ground. Each button is to signify an action associated with the boots. So for comparison, the buttons are not suppose to be screen size....just slightly larger than the boots.
Hi tmscaf, please show the settings in the rect transform tab of the prefab in the asset folder and of one inserted button.
Normal Button -
Prefab Button -
Your answer
Follow this Question
Related Questions
How do I make a panel appear after a button is clicked? 0 Answers
Using Button to change panels 0 Answers
Particles invisible in bottom half of game viewport 0 Answers
Button.OnClick() not working 1 Answer