首先在Unity场景中主摄像机上绑定一个脚本,在这里我绑定的是CameraFollow.cs的一个脚本,然后打开脚本,并复制以下的代码:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraFollow : MonoBehaviour {
private Transform target;
private
首先在Unity场景中主摄像机上绑定一个脚本,在这里我绑定的是CameraFollow.cs的一个脚本,然后打开脚本,并复制以下的代码:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraFollow : MonoBehaviour {
private Transform target;
private