Unity Chan 工程分享 - URP渲染实现 Unity版本:2019.4
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

23 行
585 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Reflection : MonoBehaviour
{
private ReflectionProbe m_probe;
[SerializeField] private Camera m_camera;
// Start is called before the first frame update
void Start()
{
m_probe = GetComponent<ReflectionProbe>();
}
// Update is called once per frame
void Update()
{
var newPos = m_camera.transform.position;
m_probe.transform.position = new Vector3(newPos.x, newPos.y * -1f, newPos.z);
m_probe.RenderProbe();
}
}