UI not scaling up on mobile

I’m trying to get my Canvas UI to scale up according to the screen resolution of the device it’s on but it’s not working.

I’ve tried the code (attached to camera) here

and here

Neither seem to make any difference, my UI is still small on the iPad mini I’m testing it on.

Any ideas?

You can add Canvas Scaler (component) to Canvas (Game Object).

Set UI Scale Mode to “Scale With Screen Size” and set the reference resolution you want.

Then, UI elements will be scaled up or down by comparing the reference resolution and your current screen resolution.

Further reference: