Description

If a UFUNCTION is declared as both BlueprintCallabl as well as static, with the meta specifier "WorldContext = "SomeContext"", the function does not show up in the list of function calls for any blueprint that derives from Object.

Workaround
Removing/commenting the WorldContext meta data will allow the function to be called from object blueprints

Regression:
No - same behavior occurs in 4.16.3 (CL 3561208)

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add code based on actor (MyActor)
  3. Add the following to MyActor.h
    UFUNCTION(BlueprintCallable, BlueprintPure, Category = Time, meta = (HidePin = "worldContextObj", DefaultToSelf = "worldContextObj"))
    	static bool ObjVisable(const UObject *worldContextObj);
    
    UFUNCTION(BlueprintCallable, BlueprintPure, Category = Time, meta = (HidePin = "worldContextObj", DefaultToSelf = "worldContextObj", WorldContext = "worldContextObj"))
    	static bool ObjHidden(const UObject *worldContextObj);
    
  4. Compile
  5. Add two blueprints to the project (one based on Actor and on based on Object)
  6. Open both blueprints and right click in event graph
  7. Search for "Obj"

Result:
In Actor blueprint, both ObjVisible and ObjHidden appear in the list. In Object blueprint, only ObjVisiable will show up.

Expected:
static BlueprintCallable functions appear in the dropdown for blueprints of all types.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-49099 in the post.

23
Login to Vote

By Design
ComponentUE - Gameplay - Blueprint
Affects Versions4.16.34.17.1
CreatedAug 31, 2017
ResolvedSep 8, 2017
UpdatedSep 20, 2017