using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[ExecuteInEditMode]
public class CameraData : MonoBehaviour
{
    public float fov = 60;

    //public float pv;
    //public float ph;
    //[Space(10)]


    //public Matrix4x4 newp;

    //public Matrix4x4 p;
    //public Matrix4x4 v;

    //public Matrix4x4 pp;
    //public Matrix4x4 vv;

    // Start is called before the first frame update
    void Start()
    {
    }

    // Update is called once per frame
    void Update()
    {
        URP.ShaderGlobalValues.ms_Matrix_P_FOV = fov;
    }

    private void OnGUI()
    {
        //var camera = CameraCache.main;

        //if (GUILayout.Button("保存"))
        //{
        //    p = camera.projectionMatrix;
        //    v = camera.worldToCameraMatrix;
        //}

        //if (GUILayout.Button("同步"))
        //{
        //    pp = p;
        //}

        //if (GUILayout.Button("设置"))
        //{
        //    camera.projectionMatrix = pp;
        //}
    }
}
