SHADE_Y3/SHADE_Engine/src/Serialization/Prefab/SHPrefabManager.h

29 lines
851 B
C++

#pragma once
#include "Assets/SHAssetMacros.h"
#include "ECS_Base/SHECSMacros.h"
#include <unordered_set>
#include <unordered_map>
namespace SHADE
{
class SHPrefabManager
{
public:
using PrefabMap = std::unordered_map<AssetID, std::unordered_set<EntityID>>;
static void AddPrefab(AssetID const& prefabAssetID) noexcept;
static void RemovePrefab(AssetID const& prefabAssetID) noexcept;
static void ClearPrefab(AssetID const& prefabAssetID) noexcept;
static void UpdateAllPrefabEntities(AssetID const& prefabAssetID) noexcept;
static void AddEntity(AssetID const& prefabAssetID, EntityID const& eid) noexcept;
static void RemoveEntity(AssetID const& prefabAssetID, EntityID const& eid) noexcept;
static void Clear() noexcept;
static bool Empty() noexcept;
private:
static PrefabMap prefabMap;
};
}