22 lines
600 B
C#
22 lines
600 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using ET.Client;
|
|
using UnityEngine;
|
|
|
|
public class PreviewCameraController : MonoBehaviour
|
|
{
|
|
public GameObject FollowMainCamera;
|
|
private Camera _camera;
|
|
|
|
public void Update()
|
|
{
|
|
if (!gameObject.activeSelf) return;
|
|
if (_camera != null && FollowMainCamera != null && FollowMainCamera.GetComponent<Camera>() != null)
|
|
_camera.orthographicSize = FollowMainCamera.GetComponent<Camera>().orthographicSize;
|
|
}
|
|
|
|
public void Start()
|
|
{
|
|
_camera = GetComponent<Camera>();
|
|
}
|
|
} |