Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

How to get RectTransform parameters of a not active object?

$
0
0
I've tried to access it directly and through SerializedObject - they all contain something wrong like zeroes or something odd.
If I do the same on activated object - then all ok (activated manually in inspector).
Making gameObject.SetActive(true) just before
gameObject.GetComponent<RectTransform>().something
does not help.

What I really need is to "copy" RectTransform from one object to another. And it doesn't work on disabled objects and i can't find the way.

Viewing all articles
Browse latest Browse all 23263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>