Can't see blueprint function library functions

I’ve created the following class:

.h
#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "MyBlueprintFunctionLibrary.generated.h"

/**
 * 
 */
UCLASS()
class UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
	

	UFUNCTION(BlueprintCallable, Category = "File")
		static bool FileSaveString(FString SaveTextB, FString FileNameB);

	UFUNCTION(BlueprintPure, Category = "File")
		static bool FileLoadString(FString FileNameA, FString& SaveTextA);
};

.cpp
#include “ExperimentGame.h”
#include “MyBlueprintFunctionLibrary.h”

bool UMyBlueprintFunctionLibrary::FileSaveString(FString SaveTextB, FString FileNameB)
{
	return FFileHelper::SaveStringToFile(SaveTextB, *(FPaths::GameDir() + FileNameB));
}

bool UMyBlueprintFunctionLibrary::FileLoadString(FString FileNameA, FString& SaveTextA)
{
	return FFileHelper::LoadFileToString(SaveTextA, *(FPaths::GameDir() + FileNameA));
}

For some reason these functions will NOT show up in the editor, even though I have succesfully compiled multiple times! I can’t find the class either by it’s name:

1 Like

Rebuilding did not help, refreshing the project files did not work, but I found a workaround to make this work:

  • If you have a active plugin in the Plugins/ folder, remove it’s Intermediate and Binaries folders
  • Upon starting your project you will be asked to rebuild this
  • When you get in-editor you can see the functions when context-sensitive is disabled.
1 Like

My English is not so good, so let the photos talk!

83298-1.png

1 Like

This didn’t work. I already had the public: section by default, and they don’t appear on the bluleprint editor.

1 Like

This worked perfectly for me. @thejjokerr this as the answer!

4.19.2 - Was trying to do a simple blueprint in the main project, compiled fine but not seeing the method anywhere. Deleted the binaries and intermediate folders, generated project files, compiled and now it is there.

  1. Locate the “.uproject” file for your project in your project’s root directory.
  2. Open the “.uproject” file in a text editor such as notepad ++
  3. Locate the “Modules” section OR (if the “Modules” section is not present) add it in the following format:
"Modules": [
    {
        "Name": "MyModule",
        "Type": "Runtime",
        "LoadingPhase": "Default",
	    "AdditionalDependencies": [
		    "Engine"
	    ]
    }
]
  1. Replace “MyModule” with the name of the module you want to add, in this case the folder in which your blueprint function library class exists.
  2. Save the changes to the “.uproject” file.
  3. Reopen your project in Unreal Editor to ensure that the module is loaded.

I add this because it stumped me a good while and maybe someone else can benefit.
Don’t forget to add , after the section of [] if you’re inserting this before the rest of what’s in your .uproject file.
I have no idea why this works or if also requires the target.cs and build.cs stuff to also be done (mentioned elsewhere).

I would have assumed, if you add C++ to a project from inside unreal editor, the module lines required would be added automatically. I used chatgpt to figure this out; it solved the problem for me, but I can’t say it’s an official step.

I happened to look up the official info on modules, and the same solution is there (scroll down):
Unreal Engine Modules | Unreal Engine 4.27 Documentation.

7 Likes

What helped me is deleting directory DerivedDataCache

so like what worked for me was removing intermediate and binary inside the plugins
removing intermediate etc in the project then generate vs, then rebuild instead of build!

"Type": "Runtime"

those code is work for me, cause I using “Editor”.