使用UnityEngine; 使用System.Collections;
公共类CameraController:MonoBehaviour {
book_id
答案 0 :(得分:1)
正如Flaming Zombie所说,你错过了一个大括号。下面应该适合你。
using UnityEngine;
using System.Collections;
public class CameraController : MonoBehaviour
{
public GameObject player;
private Vector3 offset;
void Start ()
{
offset = transform.position - player.transform.position;
}
}