示例#1
0
    public void Start()
    {
        Cursor.lockState = CursorLockMode.None;
        // Define GUI style
        textStyle = new GUIStyle("label")
        {
            alignment = TextAnchor.MiddleCenter
        };

        // Find Whiteboard GameObject in the scene
        var whiteboard = GameObject.FindGameObjectWithTag("WhiteboardPlane");

        if (null == whiteboard)
        {
            throw new System.ArgumentNullException("No WhiteboardPlane GameObject found");
        }
        whiteboardController = whiteboard.GetComponent <WhiteboardController>();
        if (null == whiteboardController)
        {
            throw new System.ArgumentNullException("No WhiteboardController script attached to WhiteboardPlane GameObject");
        }

        // Get Lecture names
        lectureNames = new string[whiteboardController.Lectures.Count];
        var i = 0;

        foreach (var lecture in whiteboardController.Lectures)
        {
            lectureNames[i++] = lecture.Name;
        }
    }
示例#2
0
 // Use this for initialization
 void Start()
 {
     wc = whiteBoard.GetComponent <WhiteboardController> ();
 }