Added abstract check to spawning actor

This commit is contained in:
2022-12-15 08:49:52 -06:00
parent af5f3cbd95
commit c3f23d1390
+6
View File
@@ -177,6 +177,12 @@ bool LevelImpl::spawnActor(Actor* actor, Actor* parent)
return true;
}
if (actor->GetType().ManagedClass->IsAbstract())
{
Log::Exception(TEXT("Cannot spawn abstract actor type."));
return true;
}
if (actor->Is<Scene>())
{
// Spawn scene