Open enlight opened 10 years ago
AActor::GetWorld()
is no longer exposed to Blueprints but many functions in Blueprint libraries expect a world context object to be passed in (from which they can obtain the relevant UWorld*
), which makes it difficult to call such functions from managed code (well... actually not really, just need to pass any in any UObject
that implements GetWorld()
from the world you're interested in). Anyway, aside from exposing functions in Blueprint libraries as static methods rather than instance methods in managed code as described in my previous comment it is also worth considering making any function that requires a world context into an extension method for UObject
. This would then be similar to how such Blueprint library functions are used in the Blueprint graph of a UObject
(though they can only be used on UObject
subclasses that actually implement GetWorld()
).
The current C# wrapper classes generated for Blueprint function libraries aren't terribly useful, the user should not need to explicitly acquire an instance of a UBlueprintFunctionLibrary in order to call the the functions it contains. For example, UKismetMathLibrary has a function called RandomBool, the user should be able to call this function in C# like so: