internal: pass NameComponentManager to GltfSceneAsset, used for finding child entities by name
This commit is contained in:
@@ -22,7 +22,7 @@ namespace thermion
|
||||
Log("No instances available for reuse. When loading the asset, you must pre-allocate the number of instances you wish to make available for use. Try increasing this number.");
|
||||
return std::nullptr_t();
|
||||
}
|
||||
Log("Creating instance %d", instanceNumber);
|
||||
TRACE("Creating instance %d", instanceNumber);
|
||||
auto instance = _asset->getAssetInstances()[instanceNumber];
|
||||
instance->recomputeBoundingBoxes();
|
||||
instance->getAnimator()->updateBoneMatrices();
|
||||
@@ -49,6 +49,7 @@ namespace thermion
|
||||
std::unique_ptr<GltfSceneAssetInstance> sceneAssetInstance = std::make_unique<GltfSceneAssetInstance>(
|
||||
instance,
|
||||
_engine,
|
||||
_ncm,
|
||||
materialInstances,
|
||||
materialInstanceCount
|
||||
);
|
||||
|
||||
@@ -285,7 +285,9 @@ namespace thermion
|
||||
auto sceneAsset = std::make_unique<GltfSceneAsset>(
|
||||
asset,
|
||||
_assetLoader,
|
||||
_engine);
|
||||
_engine,
|
||||
_ncm
|
||||
);
|
||||
auto filamentInstance = asset->getInstance();
|
||||
size_t entityCount = filamentInstance->getEntityCount();
|
||||
|
||||
@@ -372,7 +374,9 @@ namespace thermion
|
||||
auto sceneAsset = std::make_unique<GltfSceneAsset>(
|
||||
asset,
|
||||
_assetLoader,
|
||||
_engine);
|
||||
_engine,
|
||||
_ncm
|
||||
);
|
||||
|
||||
auto sceneAssetInstance = sceneAsset->createInstance();
|
||||
if(addToScene) {
|
||||
|
||||
Reference in New Issue
Block a user