Defaults main camera if the mainCamera is still unset
This commit is contained in:
parent
267ad5f8c6
commit
7e04bee8d6
|
@ -30,9 +30,14 @@ namespace SHADE
|
|||
void SHCameraDirector::UpdateMatrix() noexcept
|
||||
{
|
||||
if (mainCameraEID == MAX_EID)
|
||||
{
|
||||
auto& dense = SHComponentManager::GetDense<SHCameraComponent>();
|
||||
if (dense.size() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
mainCameraEID = dense[0].GetEID();
|
||||
}
|
||||
SHCameraComponent* camComponent = SHComponentManager::GetComponent_s<SHCameraComponent>(mainCameraEID);
|
||||
if (!camComponent)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue