示例#1
0
    // Start is called before the first frame update
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        mainUI.transform.parent = Camera.main.transform;
    }
示例#2
0
    // Start is called before the first frame update
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        mainUI.transform.parent = Camera.main.transform;

        //this is temporary, probably won't have the UI be linked directly to the camera
        cameraUI.transform.parent = Camera.main.transform;
    }