USharp
USharp copied to clipboard
How to get GetWorld() in C#?
In C++ it's easy to #include "Engine/World.h" and get access to GetWorld() global to get the root game world, I can't find a way to do that in this project from C#.
There's a property in one of the namespaces (I believe UnrealEngine.Runtime) called World. The World Property is equivalent to the C++ GetWorld() method. It's automatically accessible from all Actors and Actor Components. Although you might have to GetWorld another way if you aren't overriding an actor or actor component.