Hi,
in blueprint, I’m trying to call the function, which is defined in the UBlueprintFunctionLibrary in another game module. Unfortunately, I can’t find the function node in blueprint’s context menu. I’ve added BlueprintCallable tag to the function definition.
My project structure in solution explorer looks like this:
- Source
-
- TheGame
-
-
- TheGame.Build.cs
-
-
-
- TheGame.cpp
-
-
-
- TheGame.h
-
-
- TheOtherModule
-
-
- TheOtherModule.Build.cs
-
-
-
- BlueprintFunctionLib.h
-
-
-
- BlueprintFunctionLib.cpp
-
-
- TheGame.Target.cs
-
- TheGameEditor.Target.cs
I’ve added the reference to TheOtherModule to the *.Target.cs files:
ExtraModuleNames.AddRange( new string[] { "TheGame", "TheOtherModule" } );
Also, I added TheOtherModule as one of the TheGame private dependency:
PrivateDependencyModuleNames.AddRange(new string[] { "TheOtherModule" });
Everything compiles, but nothing works as expected. I tried to remove Intermediate, DerivedDataCache and Build directories, and nothing. Still I can’t call the blueprint function from the blueprint.
Can anyone please help me? I’m stuck and have no idea what I’m doing wrong. Thanks in advance!