Skip to main content
Minor grammar fixes, markdown formatting
Source Link
liggiorgio
  • 5.5k
  • 6
  • 27
  • 38

This is a very common problem, and the answers given here aren't correctactually. Unity Unity provides SetSizeWithCurrentAnchorsSetSizeWithCurrentAnchors() for setting either width or height, ignoring the current anchors (which is almost certainly what you want) https://docs.unity3d.com/ScriptReference/RectTransform.SetSizeWithCurrentAnchors.html.

This is a very common problem, and the answers given here aren't correct. Unity provides SetSizeWithCurrentAnchors for setting either width or height, ignoring the current anchors (which is almost certainly what you want) https://docs.unity3d.com/ScriptReference/RectTransform.SetSizeWithCurrentAnchors.html

This is a very common problem, actually. Unity provides SetSizeWithCurrentAnchors() for setting either width or height, ignoring the current anchors (which is almost certainly what you want).

Source Link

This is a very common problem, and the answers given here aren't correct. Unity provides SetSizeWithCurrentAnchors for setting either width or height, ignoring the current anchors (which is almost certainly what you want) https://docs.unity3d.com/ScriptReference/RectTransform.SetSizeWithCurrentAnchors.html