Dies ist der Teil meines Skripts mit der Ausgabe:
Zeile: 25 Tiefen. Skript: < /h4>Code: Select all
using UnityEngine.Rendering.HighDefinition;
public class ReFocus : MonoBehaviour
{
public DepthOfField DepthOfField;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
InvokeRepeating("RefoucusUpdate",0,0.1f);
}
void RefocusUpdate()
{
RaycastHit hit;
if (Physics.Raycast(transform.position, transform.forward, out hit))
{
/* Error Line */ DepthOfField.focusDistance = hit.distance;
}
}
}