#if UNITY_EDITOR using UnityEngine; using UnityEditor; using UnityEngine.SceneManagement; using System.IO; using System.Collections.Generic; public class ftSavePaddingMenu { [MenuItem("Bakery/Utilities/Save UV padding to asset", false, 60)] private static void RestorePadding() { var bakeryRuntimePath = ftLightmaps.GetRuntimePath(); var gstorage = AssetDatabase.LoadAssetAtPath(bakeryRuntimePath + "ftGlobalStorage.asset", typeof(ftGlobalStorage)) as ftGlobalStorage; if (gstorage == null) { Debug.Log("Bakery is not initalized"); return; } var sel = Selection.objects; var pathList = new List(); for(int i=0; i(); asset.data = mod; AssetDatabase.CreateAsset(asset, Path.GetDirectoryName(pathList[i]) + "/" + Path.GetFileNameWithoutExtension(pathList[i]) + "_padding.asset"); Debug.Log("Created padding asset for " + pathList[i]); ctr++; } AssetDatabase.SaveAssets(); Debug.Log("Created " + ctr + " UV padding assets"); } } #endif