# Conflicts:
#	Nuake/src/Core/Physics/DynamicWorld.cpp
#	Nuake/src/Core/Physics/DynamicWorld.h
This commit is contained in:
Antoine Pilote
2023-07-22 13:10:41 -04:00
24 changed files with 236 additions and 57 deletions

View File

@@ -402,8 +402,18 @@ namespace Nuake {
{
Ref<Prefab> newPrefab = Prefab::CreatePrefabFromEntity(Selection.Entity);
std::string savePath = FileDialog::SaveFile("*.prefab");
newPrefab->SaveAs(savePath);
Selection.Entity.AddComponent<PrefabComponent>().PrefabInstance = newPrefab;
if (!String::EndsWith(savePath, ".prefab"))
{
savePath += ".prefab";
}
if (!savePath.empty())
{
newPrefab->SaveAs(savePath);
Selection.Entity.AddComponent<PrefabComponent>().PrefabInstance = newPrefab;
FileSystem::Scan();
FileSystemUI::m_CurrentDirectory = FileSystem::RootDirectory;
}
}
ImGui::EndPopup();
}