Zoom In Out in unity3d easy tutorial
Channel:
Subscribers:
1,110
Published on ● Video Link: https://www.youtube.com/watch?v=YVuTo5itOs0
Code :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ZoomInOut : MonoBehaviour
{
public Scrollbar scrollbar;
public Camera camera;
public float maxFieldOfView;
// Start is called before the first frame update
void Start()
{
camera.fieldOfView = scrollbar.value * maxFieldOfView;
}
public void ChangeZoom()
{
camera.fieldOfView = scrollbar.value * maxFieldOfView;
}
}
Other Videos By Muhammad Shahzaib
Tags:
unity
unity3d
learn unity
unity tutorial
zoom in out unity
zoom in out using slider in unity