#pragma warning disable 612
        /// <summary>
        /// Checks if object contains old data structure. If so, converts to our new format.
        /// Will trigger if object has been edited with the Asset Store (Beta) version.
        /// </summary>
        void CheckBackwardCompatiblity(GameObject go)
        {
            z_AdditionalVertexStreams oldFormat = go.GetComponent <z_AdditionalVertexStreams>();

            if (oldFormat != null)
            {
                PolyEditorUtility.ConvertGameObjectToNewFormat(oldFormat);
            }
        }
Example #2
0
 static void Convert()
 {
     for (int i = 0; i < SceneManager.sceneCount; ++i)
     {
         Scene s = SceneManager.GetSceneAt(i);
         foreach (GameObject root in s.GetRootGameObjects())
         {
             foreach (z_AdditionalVertexStreams item in root.GetComponentsInChildren <z_AdditionalVertexStreams>(includeInactive: true))
             {
                 PolyEditorUtility.ConvertGameObjectToNewFormat(item);
             }
         }
     }
 }