We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 852ebae commit fc50f4dCopy full SHA for fc50f4d
native~/Runtime/src/UnityPrepareRendererResources.cpp
@@ -920,6 +920,15 @@ UnityPrepareRendererResources::prepareInLoadThread(
920
.thenInMainThread(
921
[asyncSystem, tileset = this->_tilesetGameObject](
922
IntermediateLoadThreadResult&& workerResult) mutable {
923
+ if (tileset == nullptr) {
924
+ // Tileset GameObject was deleted while we were loading a tile
925
+ // (possibly play mode was exited or another cause).
926
+ return asyncSystem.createResolvedFuture(
927
+ TileLoadResultAndRenderResources{
928
+ std::move(workerResult.tileLoadResult),
929
+ nullptr});
930
+ }
931
+
932
bool shouldCreatePhysicsMeshes = false;
933
bool shouldShowTilesInHierarchy = false;
934
0 commit comments