Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Slider default size is greater than it's own canvas, it shouldn't be

Discussion in 'UGUI & TextMesh Pro' started by aydenchase2005, Aug 26, 2023.

  1. aydenchase2005


    May 17, 2020
    Weird issue I'm having, trying to create a slider that will visually indicate how far along a set time you are. I have the code for the timer and everything itself, However, attempting to make the physical slider results in it being WAY larger than the canvas its created under. The canvas is set to World Space as the slider needs to appear relative to an object in game. The canvas is a child of said object as well. When I try to create the slider under said canvas, the sliders width and height are larger than my entire screen, and attempting to scale it down to the required size causes it to flip negative for some reason. For reference the canvas being used here takes up 2 square tiles of unitys grid, that's it, it's tiny. Then creating the slider, it for whatever reason is 160 by 40. I basically need a slider that is 0.1 by 0.2 essentially, but it seems that unity doesn't like this. Why?