意外符号'文件结束'

时间:2017-03-30 15:05:46

标签: unity3d

使用UnityEngine; 使用System.Collections;

公共类CameraController:MonoBehaviour {

book_id

1 个答案:

答案 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;
    }    
}