public static void OnProBuilderUpgrade()
    {
        pb_Editor_Utility.ForceRefresh(false);          // meshes need to be refreshed for some reason that I cannot recall.
        ProBuilderMenuItems.ForceCloseEditor();         // force close editor, which allows the new GUI to load resources.

        try {
            UpgradeSceneCollisions();                                           // r961+ uses Unity's component system for colliders
        } catch (System.Exception e) {
            Debug.LogWarning("ProBuilder failed upgrading scene collisions.\n" + e.ToString());
        }

        try {
            NoDrawFix.FixNoDraw();
        } catch (System.Exception e) {
            Debug.LogWarning("ProBuilder failed resetting GameObject flags.  Try manually running Repair/Fix GameObject Flags.\n" + e.ToString());
        }

        try {
            foreach (pb_Object pb in FindObjectsOfType(typeof(pb_Object)))
            {
                foreach (pb_Face face in pb.faces)
                {
                    if (face.colors == null)
                    {
                        pb.SetFaceColor(face, Color.white);
                    }
                }
            }
        } catch (System.Exception e) {
            Debug.LogWarning("Failed repairing vertex colors.\n" + e.ToString());
        }
    }
 public static void OnProBuilderUpgrade()
 {
     pb_Editor_Utility.ForceRefresh(false);          // meshes need to be refreshed for some reason that I cannot recall.
     ProBuilderMenuItems.ForceCloseEditor();         // force close editor, which allows the new GUI to load resources.
     UpgradeSceneCollisions();                       // r961+ uses Unity's component system for colliders
 }