How to Change Canvas Scaler’s Reference Resolution in Run Time?
Try
YourCanvas.GetComponent<CanvasScaler> ().referenceResolution = new Vector2 (1920,1080);
How to Change Canvas Scaler’s Reference Resolution in Run Time?
Try
YourCanvas.GetComponent<CanvasScaler> ().referenceResolution = new Vector2 (1920,1080);