From 7e1e49847da30816040928e4912f3e28d8ef54bb Mon Sep 17 00:00:00 2001 From: GiJungSUk Date: Sun, 9 Nov 2025 22:14:34 +0900 Subject: [PATCH] 111 11 --- Jusin154_Team3D/Editor/Private/Loader.cpp | 29 +++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 9c8b63afd..131fe1a4d 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -351,7 +351,7 @@ HRESULT CLoader::Loading_For_Effect() if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName, - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), wstrFileName, 0)))) { + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) { return E_FAIL; } @@ -366,7 +366,7 @@ HRESULT CLoader::Loading_For_Effect() if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName, - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), wstrFileName, 0)))) { + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) { return E_FAIL; } @@ -427,6 +427,31 @@ HRESULT CLoader::Loading_For_Effect() return S_OK; } +HRESULT CLoader::Asset_FileLoad(const _char* pDirectoryPath, const _tchar* pPreName, function AddPrototypeEvent) +{ + for (const auto& file : filesystem::directory_iterator(pDirectoryPath)) + { + if (file.is_directory()) + continue; + + string ext = file.path().extension().string(); + + if (!strcmp(ext.c_str(), ".txt")) + continue; + + _char szFilePath[MAX_PATH] = {}; + + strcpy_s(szFilePath, MAX_PATH, file.path().string().c_str()); + + wstring wstrFileName = pPreName + file.path().stem().wstring(); + + AddPrototypeEvent(wstrFileName, szFilePath); + + } + + return S_OK; +} + HRESULT CLoader::Loading_For_ObjectViewer()