In terrain generation tutorial, there is an async actor creation example: HOWTO: Create terrain from code | Flax Documentation
It runs without warning as it is, but just increasing patch counts from (2,2) to higher number creates physx errors in log window. I enabled Support Cooking At Runtime in options FYI.
I increased it to (16, 16) and met these thread collision errors:
[ 17:49:59.271 ]: [Error] PhysX Error! Code: 8.
PxShape::setSimulationFilterData() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpShape.cpp : 364.
[ 17:49:59.505 ]: [Error] PhysX Error! Code: 8.
PxShape::setSimulationFilterData() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpShape.cpp : 364.
[ 17:49:59.505 ]: [Error] PhysX Error! Code: 8.
PxShape::setQueryFilterData() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpShape.cpp : 385.
[ 17:49:59.954 ]: [Error] PhysX Error! Code: 8.
PxShape::setSimulationFilterData() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpShape.cpp : 364.
[ 17:50:00.004 ]: [Error] PhysX Error! Code: 8.
PxShape::setSimulationFilterData() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpShape.cpp : 364.
[ 17:50:00.121 ]: [Error] PhysX Error! Code: 8.
PxShape::setSimulationFilterData() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpShape.cpp : 364.
[ 17:50:00.321 ]: [Error] PhysX Error! Code: 8.
PxShape::setSimulationFilterData() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpShape.cpp : 364.
[ 17:50:00.538 ]: [Error] PhysX Error! Code: 8.
PxShape::setSimulationFilterData() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpShape.cpp : 364.
[ 17:50:00.538 ]: [Error] PhysX Error! Code: 8.
PxShape::setQueryFilterData() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpShape.cpp : 385.
[ 17:50:00.671 ]: [Error] PhysX Error! Code: 8.
PxScene::addActor() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpScene.cpp : 476.
[ 17:50:00.788 ]: [Error] PhysX Error! Code: 8.
PxShape::setSimulationFilterData() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpShape.cpp : 364.
[ 17:50:00.788 ]: [Error] PhysX Error! Code: 8.
PxShape::setQueryFilterData() not allowed while simulation is running. Call will be ignored.
Source: F:\FlaxEngineDotnet\Cache\Intermediate\Deps\PhysX\physx\source\physx\src\NpShape.cpp : 385.
It would be nice to know the official way to ‘work properly with physics object asynchronously’ if exists.