Hi everyone,
I’m having a strange issue with Unreal Engine and a custom C++ class I created (a class library with static functions). Here’s what’s going on:
The Problem:
- I created a C++ class (let’s call it
MyGameplayFunctions
) with some static functions. - I compile the code in Visual Studio → then click “Compile” in Unreal Engine → everything looks fine at first.
- BUT when I close Unreal Engine and reopen the project:
- My newly added functions are gone or not recognized in Blueprints.
- The class seems to revert to an older version, like it never saved the changes.
Packaging Error
When I try to package the project for Windows, I get an error like:
bash
CopiaModifica
Could not find a function named "SetVariableaDuringGameStaret" in 'BP_PlayerMani'
This is a Blueprint node calling one of the functions I added. The function existed before I closed UE5, but now it’s gone from the engine’s view.
What’s strange is:
- My very first test function in that class (which takes a string input) still works fine and can be packaged.
- All functions added after that are not detected anymore.
What I Tried
- Rebuilding the solution in Visual Studio.
- Compiling in UE5 after changes.
- Deleting
Intermediate
,Binaries
, andDerivedDataCache
folders before reopening. - Checking
Build.cs
to ensure the class is in the right module.
What could be causing this?
- Why does the engine “forget” the newer functions?
- Why is only the first function retained, even though the class compiles fine?
Any advice or pointers would be super appreciated! Thanks in advance