Daily Unreal Column #59 - Show World Context Pin
If you have ever created a blueprint subclass of UObject you might have noticed that you cannot use some static functions. Here is why.
Some static functions in Unreal Engine require a UObject parameter called WorldContextObject. This parameter in majority of cases is hidden due to usage of this meta keyword
... meta = (WorldContext = "WorldContextObject", ...
in a function declaration.
To overcome this limitation we can add a meta tag to our UObject class that will force these parameters to be shown and thus allow us to call this function. The only downside is that we actually have to provide a valid world context object. This is UObject declaration looks like.
UCLASS(Blueprintable, Meta = (ShowWorldContextPin))
class TEST_API UMyWorldContextObject : public UObject
{
GENERATED_BODY()
};