Hi. I created a static function in a empty class for a impact event. Wich gets called when you hit something in the game. So Physics specific effects can spawn. This function is static. How do i spawn the particle in the static function. I cant use a reference since its static.
GetWorldFromContextObject. Simply pass any Actor or UObject that lives in the world and you have a reference to the world to spawn stuff.
Alternatively you could use UGameplayStatics and call those functions from your static function.