Minor improvements and fixes for Editor

This commit is contained in:
Wojtek Figat
2021-11-04 15:59:06 +01:00
parent d5f9e18107
commit 6dfedd219b
9 changed files with 48 additions and 24 deletions

View File

@@ -1515,6 +1515,8 @@ bool Actor::ToBytes(const Array<Actor*>& actors, MemoryWriteStream& output)
// By default we collect actors and scripts (they are ManagedObjects recognized by the id)
auto actor = actors[i];
if (!actor)
continue;
ids.Add(actor->GetID());
for (int32 j = 0; j < actor->Scripts.Count(); j++)
{
@@ -1534,6 +1536,8 @@ bool Actor::ToBytes(const Array<Actor*>& actors, MemoryWriteStream& output)
for (int32 i = 0; i < actors.Count(); i++)
{
Actor* actor = actors[i];
if (!actor)
continue;
WriteObjectToBytes(actor, buffer, output);