private IEnumerator InitCoroutine()
    {
        GameObject tp = Instantiate(WallPrefab);

        model     = tp.GetComponent <MRWallUnit>();
        paintObjs = model.paintObjs;

        startButton = GameStartButton.GetComponent <PaintVR.PBSPaintableObject>();
        startButton.AddOnPaintingListener(TiggerStartEvent);
        generator.targetObject = GameStartButton;
        generator.GBufferGeneratorInit();

        yield return(new WaitForSeconds(0.1f));

        generator.targetObject = wall.gameObject;
        generator.GBufferGeneratorInit();

        yield return(new WaitForSeconds(0.1f));

        foreach (var obj in paintObjs)
        {
            generator.targetObject = obj.gameObject;
            generator.GBufferGeneratorInit();

            yield return(new WaitForSeconds(0.1f));
        }

        PBSRoot = model.coverMesh.gameObject.AddComponent <PaintVR.PBSPaintableObjectRoot>();
        PBSRoot.registerUndoMgr = false;

        Mesh mesh = model.coverMesh.mesh;

        Vector3[] vertexs = new Vector3[4];
        vertexs[0] = new Vector3(-col / 2.0f, -row / 2.0f, 0.0f);
        vertexs[1] = new Vector3(+col / 2.0f, +row / 2.0f, 0.0f);
        vertexs[2] = new Vector3(+col / 2.0f, -row / 2.0f, 0.0f);
        vertexs[3] = new Vector3(-col / 2.0f, +row / 2.0f, 0.0f);

        mesh.vertices        = vertexs;
        model.coverMesh.mesh = mesh;

        generator.targetObject = model.coverMesh.gameObject;
        generator.GBufferGeneratorInit();

        cleaner.srcTexture = PBSRoot.PaintTextureData.AlbedoTexture;

        yield return(new WaitForSeconds(0.1f));

        InitMRWall();

        yield return(new WaitForSeconds(0.1f));

        model.coverMesh.GetComponent <Renderer>().enabled = false;
        model.coverMesh.GetComponent <Collider>().enabled = false;
        model.coverMesh.transform.parent = ARWall.transform;
        Destroy(model.gameObject);

        yield return(new WaitForSeconds(0.1f));

        init = true;
    }
 public void AddCancelComboObj(PaintVR.PBSPaintableObject obj)
 {
     obj.AddOnPaintingListener(CancelCombo);
     cancelComboObj.Add(obj);
 }