Search Feedback

101
votes

Expose width and height of RectTransform

Scripting

-

-

Expose the width and height of RectTransform. It is nonsensical to have to find them via the sizeDelta.

Comments (2)

  1. 5399acf757c116b4cb1af32b2607bb8d?d=mm

    hessel_mm

    Jan 27, 2019 19:32

    You can get to a recttransform's dimensions easily via its `rect` property: https://docs.unity3d.com/ScriptReference/RectTransform-rect.html

  2. 4b2a4d5cc3c86e54afaec2274b207566?d=mm

    Shorely

    Jan 26, 2019 05:45

    I don't think I can say this better. Perhaps it's also ridiculous.

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(11030)

2D

(290)

Ads

(63)

AI & Navigation

(83)

Analytics

(130)

Animation

(413)

Asset Store

(370)

Asset Store Publisher

(21)

Assets

(557)

Audio

(185)

Cloud Build

(154)

Collaborate

(70)

Docs & Tutorials

(251)

Editor

(2579)

Everyplay

(17)

Game Performance Reporting

(22)

General

(1003)

Graphics

(903)

GUI

(447)

Input

(173)

Licensing

(93)

Networking

(192)

Physics

(392)

Platforms

(448)

Profiling & Optimization

(84)

Runtime

(188)

Scripting

(1154)

Terrain

(177)

WebGL

(145)