Problem is very old, and it never was resolved or explained (don’t point to official documentation, it does not explain or resolve this problem). So we have 2 objects, they are exactly same, they are in same place in hierarchy, one has this problem, one does not, I even tried to copy normal object, and with few clicks I get “Some values driven by Canvas”. Please look at the screenshots. My aim is to make second object same is first one, and remove this “Some values driven by Canvas”.
I can say that this can be a Unity Serialization issue. You have Canvas Scaler on both, so they both must have blocks like “Some values driven by Canvas”.
You can turn off and turn on the Game Object to fix that as it must be. Just tested with Unity 2022.3.42.
At this thing “Some values driven by Canvas” probably should not appear at all, because it does not make sense. Tried to switch off and on “Canvas Scaler” nothing…
Having “Some values driven by Canvas” on the transform with the Canvas component is the expected outcome, unless the render mode is set to “World Space”. For “Screen Space” canvases, it’s the canvas that determines the rect transform properties (to make them match whatever the screen size is) and it’s correct that those values are locked.
In your second screenshot, it’s a bug that those values aren’t locked. Note that the game object icon in the header indicates that one of its parent game objects is inactive, making the canvas game object inactive as well. If the canvas hasn’t previously been active (e.g. if you have pasted it in there), then it hadn’t had the chance to lock the values. But as soon as the canvas gets activated, it will lock those values and keep them locked.
Why do you want the rect transform to be unlocked? Which values do you want to change?
You cannot move a screen space canvas and its size is determined by the screen size. So there really isn’t anything that you should need to change. If you want to adjust the size of the canvas content, then use the configuration on the canvas scaler.
Yes Adrian you are right, it’s kind of a bug, I wonder if it’s fixed in newer versions (I am on 2022-3-LTS). When Canvas of SuperShotgun get activated in PlayMode, it also get this tag “Some values driven by Canvas”
The uGUI UI system is effectively in maintenance mode. It hasn’t gotten any major new features in years and only the must urgent bugs are fixed. This is both a low-severity bug and would be hard to fix for Unity*, so I doubt it will ever get addressed.
(* uGUI is implemented as C#, using mostly standard Unity APIs, and this is a basic limitation of MonoBehaviour scripts. Awake is not called until the script’s game object is activated and there’s no other earlier message that could be used. Unity cannot change the behaviour of Awake, since many many scripts depend on it, and would have to add a new API just to fix this bug.)