17 lines
392 B
C#
17 lines
392 B
C#
|
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;
|
||
|
});
|
||
|
}
|
||
|
}
|