Drag and drop prefab into scene tree. Play pause snapshot system

This commit is contained in:
antopilo
2021-09-08 21:28:53 -04:00
parent b403082ca2
commit 33b3962e51
9 changed files with 107 additions and 56 deletions

View File

@@ -11,6 +11,17 @@ namespace Nuake {
return prefab;
}
Ref<Prefab> Prefab::New(const std::string& path)
{
Ref<Prefab> newPrefab = CreateRef<Prefab>();
newPrefab->Path = path;
std::string prefabTextContent = FileSystem::ReadFile(path);
newPrefab->Deserialize(prefabTextContent);
return newPrefab;
}
void Prefab::EntityWalker(Entity entity)
{
entity.GetComponent<NameComponent>().IsPrefab = true;