Description

If a function in a custom code Blueprint Function Library class contains meta = (WorldContext = "WorldContextObject") as a specifier, that function does not appear in context searches in a UObject Blueprint event graph.

Update - TimL
------------------
Another user mentioned that they are seeing very similar results after creating a BlueprintFunctionLibrary in a Blueprint, then try to access those functions from another UObject-derived Blueprint.

Update - TimL
------------------
This has been further narrowed down to only happen in instances where the UFUNCTION takes in a UObject parameter named "WorldContextObject"

Steps to Reproduce
  1. Create a new code project using the first person template, no starter content.
  2. Add a new code class to the project derived from BlueprintFunctionLibrary.
  3. In the header file for the new class, add the following code:
    UFUNCTION(BlueprintCallable, Category = Game, meta = (WorldContext = "WorldContextObject"))
    static void SpawnUnit(class UObject* WorldContextObject);
    
  4. Add the following code to the source file for the new Blueprint Function Library class:
    void UMyBlueprintFunctionLibrary::SpawnUnit(class UObject* WorldContextObject)
    {
    }
    
  5. Build the project in Visual Studio.
  6. Open the project in the Editor.
  7. Create a new Blueprint deriving from Actor.
  8. Right-click in the Event Graph for the new Blueprint and search for "SpawnUnit".
    • Note that the function appears in the context menu.
  9. Create a new Blueprint deriving from Object.
  10. Right click in the Event Graph for the new Blueprint and search for "SpawnUnit".

RESULT:
The function does not appear in the context menu.

EXPECTED:
The function appears in the context menu.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

8
Login to Vote

Won't Fix
ComponentUE - Gameplay - Blueprint
Affects Versions4.7.64.94.11.24.13
CreatedMay 15, 2015
ResolvedAug 18, 2021
UpdatedAug 18, 2021
View Jira Issue