static void AllFilsInResourcesFolderWithAssetBundleInfo() { // 시작팝업 if (false == ShowDialog("[SHTools] Resources Listing", SHEditorResourcesLister.m_strMsg_1, "확인", "취소")) { return; } // 알리아싱 var pStartTime = DateTime.Now; var strSaveResourcePath = string.Format("{0}/{1}", SHPath.GetPathToJson(), "ResourcesTable.json"); var strSaveBundlePath = string.Format("{0}/{1}", SHPath.GetPathToJson(), "AssetBundleInfo.json"); var pLister = new SHResourcesLister(); // 리스팅 int iFileCount = pLister.SetListing(SHPath.GetPathToResources()); SHResourcesLister.SaveToResources(pLister.m_dicResources, strSaveResourcePath); SHResourcesLister.SaveToAssetBundleInfo(pLister.m_dicAssetBundles, strSaveBundlePath); SHResourcesLister.SaveToDuplicationList(pLister.m_dicDuplications, string.Format("{0}/{1}", SHPath.GetPathToJson(), "DuplicationResourcesList.txt")); // 종료팝업 if (true == ShowDialog("[SHTools] Resources Listing", string.Format(SHEditorResourcesLister.m_strMsg_3, iFileCount, strSaveResourcePath, ((DateTime.Now - pStartTime).TotalMilliseconds / 1000.0)), "파일확인", "닫기")) { System.Diagnostics.Process.Start(strSaveResourcePath); } }
static void SelectFiles() { // 시작팝업 if (false == ShowDialog("[SHTools] Resources Listing", SHEditorResourcesLister.m_strMsg_2, "확인", "취소")) { return; } // 선택 오브젝트 체크 var pObjects = Selection.objects; if ((null == pObjects) || (0 == pObjects.Length)) { ShowDialog("[SHTools] Resources Listing", "선택된 오브젝트가 없습니다.", "확인"); return; } // 알리아싱 int iFileCount = 0; var pStartTime = DateTime.Now; var pLister = new SHResourcesLister(); // 절대경로처리 var strAbsolutePath = SHPath.GetPathToAssets(); strAbsolutePath = strAbsolutePath.Substring(0, (strAbsolutePath.IndexOf("Assets") - 1)).Replace("\\", "/"); // 리스팅 for (int iLoop = 0; iLoop < pObjects.Length; ++iLoop) { iFileCount += pLister.SetListing( string.Format("{0}/{1}", strAbsolutePath, AssetDatabase.GetAssetPath(pObjects[iLoop]))); } var strSavePath = string.Format("{0}/{1}", strAbsolutePath, "SelectFiles.txt"); SHResourcesLister.SaveToResources(pLister.m_dicResources, strSavePath); // 종료팝업 ShowDialog("[SHTools] Resources Listing", string.Format(SHEditorResourcesLister.m_strMsg_3, iFileCount, strSavePath, ((DateTime.Now - pStartTime).TotalMilliseconds / 1000.0)), "확인"); System.Diagnostics.Process.Start(strSavePath); }