using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class CameraSizeController : MonoBehaviour { public Slider MySlider; public Camera MyCam; // Start is called before the first frame update void Start() { MySlider.onValueChanged.AddListener((i) => { MyCam.orthographicSize = i; }); } }