Sp3 141 camera system #108

Merged
maverickdgg merged 8 commits from SP3-141-Camera-System into main 2022-10-23 12:52:37 +08:00
1 changed files with 6 additions and 1 deletions
Showing only changes of commit 7e04bee8d6 - Show all commits

View File

@ -31,7 +31,12 @@ namespace SHADE
{ {
if (mainCameraEID == MAX_EID) if (mainCameraEID == MAX_EID)
{ {
return; auto& dense = SHComponentManager::GetDense<SHCameraComponent>();
if (dense.size() == 0)
{
return;
}
mainCameraEID = dense[0].GetEID();
} }
SHCameraComponent* camComponent = SHComponentManager::GetComponent_s<SHCameraComponent>(mainCameraEID); SHCameraComponent* camComponent = SHComponentManager::GetComponent_s<SHCameraComponent>(mainCameraEID);
if (!camComponent) if (!camComponent)