I found this code. it works: Code (CSharp): public Image mask; originalSize = mask.rectTransform.rect.width; I can't find in the documentation the function: rectTransform in the image page https://docs.unity3d.com/ScriptReference/UIElements.Image.html why is that?
You're looking at the documentation for: Code (csharp): UnityEngine.UIElements.Image While the code sample you're using is referencing a: Code (csharp): UnityEngine.UI.Image Unity just utterly dropped the ball on their documentation, so the docs for UGUI is gone. It hasn't changed since the last version of Unity, so you can find the docs you're looking for here.
Hello @squarelife @Baste the UI API documentation is now located in this package https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/index.html
Nice. Then you should fix https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/index.html, which says that it's somewhere else!
Also, I've visited your package manager manual pages a bunch without finding the scripting reference. Maybe it's too hard to spot the "Scripting API" button in the top bar? Or maybe it's just me.
Yes you're right it's hard to spot - we're going to fix the CSS so that the font is a lighter colour in the navigation. I'll also adjust the incorrect info on the homepage.