I’m getting this error message but I’m not sure that i understand it…
Assets/Scripts/Colour.cs(184,45): error CS1061: Type `UnityEngine.RectTransform' does not contain a definition for `width' and no extension method `width' of type `UnityEngine.RectTransform' could be found (are you missing a using directive or an assembly reference?)
Hi!
I would say, there is no width property in RectTransform.
But you can use offsetMax and OffsetMin or you can just change a SizeDelta.
what should you use? it depends on layouts, so… try to play with it, and you can try to check debug values in editor of your image to understand what do you need.