Run a function after each physics cycle, without an AActor class

Hello,

i would like to execute a function in a normal class after each physics run of the Engine.

I have searched quite a lot in the documantations but couldn’t find anything safe except this entry [1] which can only be used in AActor classes.

What options do I have? It is important that this function is only executed after a physics run and that it is also waited until it is fully executed.

I have only been in UE for a short time and have previously developed in other engines where there are simple options for this.

Many thanks in advance.


[1] Actor Ticking in Unreal Engine | Unreal Engine 5.0 Documentation

When you say “waited until it is fully executed,” what is waiting?
Rendering?
Main thread?
Further physics?
Networking?
Sound?
GUI?

In general, you can create a FTickFunction instance and make sure it’s scheduled for the Main thread and run in the post-update tick group and it’ll probably be what you’re looking for.

Another option is to go through FGenericTask and add it at the end of the post-physics tick group.

i am sorry this was unclear, what i meant by waiting is that it should wait until my function is completed before starting the next physics run.