When to rebuilld a mesh on a UProceduralMeshComponent?

I have an actor with attached UProceduralMeshComponent instances attached to it. I currently rebuild these meshes in the game loop (initially on BeginPlay or PostLoad or on Tick). In order to not block tick so long, I prepare those meshdata beforehand.

Now I have the question, if it is possible to create a mesh component (section) outside of the game loop or at least what are the consequences if I would do this and what can I do to mitigate those potential consequences?

Thanks and Cheers!

Just thought about creating the mesh component outside of the loop and only attach it to the actor in the game loop.

Here are the options I will check out on the weekend:

  1. Create a new ActorComponent in another thread (do not know if this is possible) and replace the old one with the new one in the game loop
  2. Simply modify the procedural mesh outside of game loop rapidly and look what is happening (The only thing I can do is break the game right…)
  3. Use a second procedural mesh that is not attached to the actor component as a kind of an off-screen buffer and switch between the two in the game loop
  4. Use two actor components and switch one to invisible and one to visible creating also an off-screen buffer and check if I can modify the invisible one outside of the game loop
  5. Check if I can do something magically with the sections of an procedural mesh in order to modify it off-screen and check if I can modify the visibility
  6. Just keep it the way it is and bother later

If anyone of you knows something that might help me here, I would highly appreciate it…

Thanks for reading, Cheers.