Allows to resize a file input image before upload to the server. The resized image will be attached to original file input. Then you can submit your form without ajax or handle it as you need.
<form>
<label>Select image</label>| #!/bin/bash -ex | |
| # | |
| # Push the current repository to GitHub, in small enough chunks that it | |
| # won't exceed the pack-size limit | |
| # Commit to start with, counting from the oldest. If the process fails, | |
| # you can change this variable to restart from where it failed. | |
| START_COMMIT=1000 | |
| # Number of commits to push at a time, counting from the oldest. If a |
| using UnityEngine; | |
| /// <summary> | |
| /// Keeps constant camera width instead of height, works for both Orthographic & Perspective cameras | |
| /// Made for tutorial https://youtu.be/0cmxFjP375Y | |
| /// </summary> | |
| public class CameraConstantWidth : MonoBehaviour | |
| { | |
| public Vector2 DefaultResolution = new Vector2(720, 1280); | |
| [Range(0f, 1f)] public float WidthOrHeight = 0; |