Skip to content

Commit

Permalink
Traktor: Fixed issue with creating external entities, which have chil…
Browse files Browse the repository at this point in the history
…d entities, in scene editor.
  • Loading branch information
apistol78 committed Jul 4, 2024
1 parent 5932da9 commit a14733c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion code/Mesh/Instance/InstanceMeshComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ InstanceMeshComponent::~InstanceMeshComponent()

void InstanceMeshComponent::destroy()
{
T_FATAL_ASSERT(m_cullingInstance == nullptr);
m_mesh.clear();
MeshComponent::destroy();
}
Expand Down
6 changes: 5 additions & 1 deletion code/Scene/Editor/EntityAdapterBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "Scene/Editor/IEntityEditorFactory.h"
#include "Scene/Editor/SceneEditorContext.h"
#include "World/Entity.h"
#include "World/EntityBuilder.h"
#include "World/EntityData.h"
#include "World/IEntityComponent.h"
#include "World/IEntityFactory.h"
Expand Down Expand Up @@ -80,7 +81,10 @@ Ref< world::Entity > EntityAdapterBuilder::create(const world::EntityData* entit

// Do not create adapters when we're inside an external entity.
if (is_a< world::ExternalEntityData >(m_currentEntityData))
return m_entityFactory->createEntity(this, *entityData);
{
const world::EntityBuilder entityBuilder(m_entityFactory, m_world);
return m_entityFactory->createEntity(&entityBuilder, *entityData);
}

// Get adapter; reuse adapters containing same type of entity.
Cache& cache = m_cache[entityData->getId()];
Expand Down

0 comments on commit a14733c

Please sign in to comment.