recttransform left right top bottom in unity2d code example
Example: recttransform left right top bottom in unity2d
RectTransform rectTransform = gameObjectButton.GetComponent<RectTransform>(); rectTransform .SetInsetAndSizeFromParentEdge(RectTransform.Edge.Bottom, 0, 0); rectTransform .SetInsetAndSizeFromParentEdge(RectTransform.Edge.Top, 0, 0); rectTransform .SetInsetAndSizeFromParentEdge(RectTransform.Edge.Left, 0, 0); rectTransform .SetInsetAndSizeFromParentEdge(RectTransform.Edge.Right, 0, 0);