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.
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.