Firstborn/Assets/Scripts/CameraSizeController.cs

17 lines
392 B
C#
Raw Normal View History

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;
});
}
}