RuntimeWarning: SystemLibrary: No world was found for object (/Engine/Transiernt.TimerDynamicDelegate__PythonCallable_4) passed in to UEngine::GetWorldFromContextObject().
What’s the problem? Please, show a correct way to do it.
This aint the best approach but it works (This is for a forever loop).
This is my approach until I understand the python API properly:
import unreal
from threading import Timer
def hello():
unreal.log_warning("Hello World")
# Create a new timer that calls this function again after 5 seconds
t = Timer(5.0, hello)
t.start()
# Start the timer for the first time
hello()