Exemple #1
0
        public static void NewWorkspace()
        {
            if (WorkspaceView != null)
            {
                throw new Exception("BlocklyUI.NewWorkspace- there is already a workspace");
            }

            Workspace workspace = new Workspace(new Workspace.WorkspaceOptions());

            WorkspaceView = Object.FindObjectOfType <WorkspaceView>();
            WorkspaceView.BindModel(workspace);

            UICanvas = WorkspaceView.GetComponentInParent <Canvas>();
        }